Creators Reference
Here are all the docs related to dealings with creators and the properties they have.
Creator
- class pykemo.creators.creators.Creator(*, id, name, service, indexed, updated, public_id, favorited)
Container class for a creator. Mainly initialized when using helper functions like
get_creator().- Parameters:
id (
str) – It is the ID of the creator.name (Optional[
str]) – It is the given name of the creator.service (
ServiceType) – The service that provides the content.indexed (
datetime.datetime) – Datetime that expresses when the creator is indexed.updated (
datetime.datetime) – Datetime that expresses when the creator was last updated.public_id (Optional[
str]) – The public ID that the creator shows.favorited (Optional[
int]) – A integer displaying how many have favorited this creator.
- property announcements: list[Announcement]
Gets a list of the creator’s announcements, if any. Mainly relevant for Patreon service.
- Returns:
A list of the creator’s announcements, if any.
- Return type:
list[
Announcement]
- property channels: list[DiscordChannel]
Gets all the Discord channels associated with this creator. This is because the ID of a Discord ‘creator’, is really the ID of a Discord server/guild.
Note
Only really works if the service is Discord, returns an empty list if not.
- Returns:
A list of the creator’s associated Discord channels, if any.
- Return type:
list[
DiscordChannel]
- property fancards: list[Fancard]
Gets a list of the fancards associated with this creator.
Note
If not from a Fanbox service, it will return an empty list instead.
- Returns:
A list of the creator’s fancards, if any.
- Return type:
list[
Fancard]
- fetch_channels()
Fetches a request for Discord channels, if available.
- Returns:
A list of channels.
- Return type:
list[
DiscordChannel]
- classmethod from_profile(service, creator_id)
Retrieves a creator using its profile info.
- get_channel(channel_id)
Fetches a specific channel of this creator by id.
- Parameters:
channel_id (
str) – The ID of the channel to find.- Returns:
The channel in question, if found. Otherwise returns
None.- Return type:
Optional[
DiscordChannel]
- get_post(post_id)
Get a specific post by its ID.
- Parameters:
post_id (
str) – The ID of the post in question.- Returns:
The post, if found. Otherwise returns
None.- Return type:
Optional[.Post]
- other_links()
Searches for other accounts of this creator.
- posts(*, query=None, max_posts=50, before=None, since=None, asynchronous=False)
Retrieves posts under this creator. If the creator is from Discord, it won’t retrieve any, as that service doesn’t use ‘posts’.
- Parameters:
query (Optional[
str]) – The string to search for specific posts.max_posts (Optional[
int]) – The max number of posts to look through. This is NOT necessarily the number of posts to enter the lists. If None, it will try to retrieve ALL the posts.before (Optional[
datetime.datetime]) – Include only posts before this date.since (Optional[
datetime.datetime]) – Include only posts after and including this date.asynchronous (
bool) – Wether to use asynchronous requests to maybe boost performance. It’s really only recommended with queries of no more than 350 posts. Too many queries overwhelms the server and it actually slows the request down.
- Raises:
ValueError – If
max_postsis negative or zero.- Returns:
A list of posts that fit the filters.
- Return type:
list[
Post]
- property url: UrlLike
- Returns:
The full URL of the creator.
- Return type:
UrlLike
Announcements
- class pykemo.announcements.announcements.Announcement(*, service, creator_id, ann_hash, content, added, creator)
Announcement tied to a creator. Mainly used in users with Patreon service. Instances of this class are usually created through
Creator.announcements.- Parameters:
service (
ServiceType) – The service of the creator that made this announcement. Tipically Patreon.creator_id (
str) – The id of this announcement’s creator.ann_hash (
str) – The hash of the announcement.content (
str) – The actual contents of the announcement. May contain HTML tags.added (
datetime.datetime) – When was this announcement made.creator (
Creator) – The creator of this announcement.
Fancards
- class pykemo.fanbox.fancards.Fancard(*, id, creator_id, creator, file_id, file_size, file, price, fhash, ihash=None, last_checked, added, mtime, ctime)
A Fancard is an exclusive feature of the Fanbox service, in which each supporter can hold a ‘card’ to show proof of their support to the creator. They have an image inside and as such their working are similar to the File type, but they both have different fields.
- Parameters:
id (
str) – The ID of this fancard.creator_id (
str) – The ID of this fancard’s creator.creator (
Creator) – The creator of this fancard.file_id (
str) – The ID of this fancard’s associated file.file_size (
int) – The size of the fancard’s file size.file (
File) – The file of this fancard.price (
str) – General price tag for the tier this fancard belongs to.fhash (
str) – The hash of this fancard.ihash (Optional[
str]) – The iterative hash of this fancard. Usually None.last_checked (
datetime.datetime) – When was this fancard last revised.added (
datetime.datetime) – When was this fancard first added.mtime (
datetime.datetime) – Dark magic. Dunno why it’s there, but data is data, I guess.ctime (
datetime.datetime) – Dark magic. Dunno why it’s there, but data is data, I guess.