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, relation_id)
Container class for a creator. Mainly initialized when using helper functions like
get_creator().- Parameters:
id (
CreatorID) – 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.relation_id (Optional[
int]) – The relation ID of this creator.
- async announcements()
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]
- async channels()
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]
- async fancards()
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]
- async fetch_channels()
Fetches a request for Discord channels, if available.
- Returns:
A list of channels. Might also be empty if there is no session assigned.
- Return type:
list[
DiscordChannel]
- async classmethod from_profile(service, creator_id, kemo_session)
Retrieves a creator using its profile info.
- Parameters:
service (
ServiceLike) – The service of the creator.creator_id (
str) – The ID of the creator.session (
KemoSession) – The Kemono Session to use for its creation.kemo_session (KemoSession)
- Returns:
If the creator is found, retrieve and create a
Creatorinstance, otherwise returnNone.- Return type:
Optional[
Creator]
- async 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]
- async get_post(post_id)
Get a specific post by its ID.
- Parameters:
post_id (
PostID) – The ID of the post in question.- Returns:
The post, if found. Otherwise returns
None.- Return type:
Optional[.Post]
- async other_links()
Searches for other accounts of this creator.
- async posts(*, query=None, max_posts=50, before=None, since=None)
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.
- Raises:
ValueError – If
max_postsis negative or zero.- Returns:
A list of posts that fit the filters. Might be empty if there is no session assigned.
- Return type:
list[
Post]
- async classmethod random(session)
Tries to retrieve a random creator from the site.
- Parameters:
session (
KemoSession) – The Kemono Session to use for the request.- Returns:
If a creator is found, retrieve and create a
Creatorinstance, otherwise returnNone.- Return type:
Optional[
Creator]
- set_underlying_session(ks)
Quietly sets the session which the creator uses for its requests.
- Parameters:
session (
KemoSession) – The session instance.ks (KemoSession)
- Returns:
The same instance of the creator, for convenience.
- Return type:
- async tags(*, as_dict=False)
Searches for the tags of this creator.
- Parameters:
as_dict (
bool, optional) – Wether to return a dictionary with the tags names as keys and their post counts as values, defaults toFalse.- Returns:
A list with all the tags attributed to this creator.
- Return type:
TagsResult
- property url: UrlLike
- Returns:
The full URL of the creator.
- Return type:
UrlLike
Announcements
- class pykemo.patreon.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.