Kred API main

Top-level package for kred.

Kred Models

class kred.models.BundleModel[source]

This class is the model of a bundle record.

channel

The unique channel of the bundle.

Returns:The channel name
Return type:string
color

The unique color of the bundle.

Returns:The bundle color
Return type:string
cover

The unique cover image of the bundle.

Returns:The bundle image
Return type:string
description

The description of the bundle.

Returns:The bundle description
Return type:string
max_subscribers

The max_subscribers value of the bundle.

Returns:The max subscribers value
Return type:string
name

The unique name of the bundle.

Returns:The bundle name
Return type:string
class kred.models.LineModels[source]

This class is the model of a Line record.

batches

The unique batches of the bundle.

Returns:The bundle batches
Return type:string
bundle

The unique bundle of the bundle.

Returns:The bundle name
Return type:string
line

The unique line of the bundle.

Returns:The bundle line
Return type:string
method

The unique method of the bundle.

Returns:The bundle method
Return type:string
odds

The unique odds of the bundle.

Returns:The bundle odds
Return type:string
status

The unique status of the bundle.

Returns:The bundle status
Return type:string
class kred.models.NftModel[source]

This class is the model of a NFT record.

back

The back image of the nft.

Returns:The nft back image
Return type:string
color

The color name of the nft.

Returns:The color name
Return type:string
count

The unique value of the nft count.

Returns:The nft count value
Return type:string
front

The front image of the nft.

Returns:The nft image
Return type:string
layout

The unique layout of the nft.

Returns:The nft layout
Return type:string
mesh

The mesh name of the nft.

Returns:The nft mesh
Return type:string
name

The unique name of the nft.

Returns:The nft name
Return type:string
nsfw

The nsfw name of the nft.

Returns:The nft nsfw
Return type:string
pattern

The unique pattern of the nft.

Returns:The nft pattern
Return type:string
pattern_color

The pattern color of the nft.

Returns:The nft pattern color
Return type:string
payload

The payload name of the nft.

Returns:The nft payload
Return type:string
text_color

The text color name of the nft.

Returns:The nft text color
Return type:string
type

The unique nft type.

Returns:The nft type
Return type:string
wrapper

The wrapper name of the nft.

Returns:The nft wrapper
Return type:string
class kred.models.SocialActionModels[source]

This class is the model of a social action record.

grab

The NFT Grab ID

Returns:The grab
Return type:string
message

The NFT Message Id

Returns:The Message Id
Return type:string
nft

The unique nft value.

Returns:The nft id
Return type:integer
sequence

The batch sequence

Returns:The sequence
Return type:integer
symbol

The batch symbol

Returns:The symbol
Return type:string
text

The NFT Message text

Returns:The text
Return type:string
uuid

The NFT UUID value

Returns:The uuid id
Return type:string

Kred Services

class kred.services.AuthenticationClient(token)[source]

A authentication client that dynamically discovers and interacts with the authentication APIs

login(provider=None, email=None, password=None, code=None)[source]

Log in using a code, password, OAuth, or Ethereum wallet.

Parameters:
  • provider – it is a dictionary which used to filter the records
  • email – it is a dictionary which used to filter the records
  • password – it is a dictionary which used to filter the records
  • code – it is a dictionary which used to filter the records
logout(session=None)[source]

Log out and delete the current session.

Parameters:provider – Session ID (if not provided by an HTTP cookie).
register(provider=None, email=None, password=None, phone=None, name=None, domain=None)[source]

Log in using a code, password, OAuth, or Ethereum wallet.

Parameters:
  • provider – it is a dictionary which used to filter the records
  • email – it is a dictionary which used to filter the records
  • password – it is a dictionary which used to filter the records
  • code – it is a dictionary which used to filter the records
  • name – The user’s name.
  • domain – The user’s sub-domain (required for minting NFTs).
class kred.services.BundleClient(token)[source]

A bundle client that dynamically discovers and interacts with the bundle APIs

bundles(bundle=None, name=None)[source]

The function returns detailed information about the nft based on the identifier.

Parameters:
  • bundle – A integer that used to fetch the records
  • name – A string that is user uuid to matching the user
claim(code=None)[source]

List claim codes for a bundle.

Parameters:code – A string The code of the bundle to claim.
code(bundle=None, count=1)[source]

lines function calls Get api to get the bundles lines details.

Parameters:
  • bundle – A integer ID of the bundle to update.
  • count – A integer number of codes to create.
codes(bundle=None, count=1, page=1)[source]

List claim codes for a bundle.

Parameters:
  • bundle – A integer ID of the bundle to update.
  • count – A integer number of codes to create.
  • page – A integer number of codes to return.
create(model)[source]

Creating a create method for the Bundle class

Parameters:model – A model object that contains all the bundle model information
line(model)[source]

line function calls POST api to Create or update bundle line.

Parameters:model – A model object that contains all the bundle model information
lines(bundle=None)[source]

lines function calls Get api to get the bundles lines details.

Parameters:bundle – A integer bundle value used to fetc the bundle details
report(bundle=None)[source]

Detailed bundle report, including subscribers, delivery statistics, and redemptions

Parameters:bundle – A integer ID of the bundle to produce the report.
subscribers(bundle=None, status='active')[source]

List the subscribers to a bundle.

Parameters:
  • bundle – A integer ID of the bundle to produce the report.
  • status – A string active or waiting subscribers.
subscriptions(status='active')[source]

List the bundles the current user is subscribed to.

Parameters:status – A string active or waiting subscribers.
update(model)[source]

line function calls POST api to Create or update bundle line.

Parameters:model – A model object that contains all the bundle model information
class kred.services.NftClient(token)[source]

A Nft client that dynamically discovers and interacts with the nfts APIs

data(nft)[source]

This funcation will return the NFT metadata in ERC721 compatible format. :param nft: A integer that used to fetch the records

draft(model, draft)[source]

Creating a draft method for the NFT class and return the values :param draft: A integer draft value to draft an NFT; leave empty to create a new draft :param model: A model object that contains all the model parameters information

edit(model, batch)[source]

Creating a edit method for the NFT class and return the values

Parameters:
  • model – A model object that contains all the model parameters information
  • batch – You must be the batch creator, and the batch cannot have been distributed to users.
mint(model)[source]

calling a mint method for the NFT class and return the values :param model: A model object that contains all the model parameters information

nft(nft=None, uuid=None, symbol=None, sequence=None)[source]

The function returns detailed information about the nft based on the identifier.

Parameters:
  • nft – A integer that used to fetch the records
  • uuid – A string that is user uuid to matching the user
  • symbol – A string that is used to fetch the records
  • sequence – A string that is used to fetch the records
nfts(params)[source]

This function will return the nfts details.

Parameters:params – it is a dictionary which used to filter the records
upload(name, content)[source]

Upload image assets

Parameters:
  • name – Name of the image
  • content – Base64-encoded image data.
class kred.services.ReportingClient(token)[source]

A reporting client that dynamically discovers and interacts with the reporting APIs

given(params)[source]

Get history of NFTs given.

Parameters:params – it is a dictionary which used to filter the records
history(params)[source]

This function get sales list

Parameters:params – it is a dictionary which used to filter the records
leaders(params)[source]

List top users by NFT ownership, creation, or circulation.

Parameters:params – it is a dictionary which used to filter the records
ledger(user=None, count=10, page=1)[source]

This function get user’s transaction ledger

Parameters:
  • user – it is a user string value which used to filter the records
  • count – it is a integer value which return how many records will return
  • page – it is a integer value which return how many page will return
populartags(days=1, count=10)[source]

List recent popular tags.

Parameters:
  • days – it is a integer value which used to filter the records
  • count – it is a integer value which return how many records will return
tagcounts(tags=None)[source]

Get counts for all tags or a specified set of tags

Parameters:tags – it is a string which used to filter the records
trendingtags(days, count)[source]

List curent trending tags.

Parameters:
  • days – it is a integer value which used to filter the records
  • count – it is a integer value which return how many records will return
class kred.services.SocialClient(token)[source]

A social action client that dynamically discovers and interacts with the social action APIs

ban(model, user=None)[source]

This function use ban a user from a message stream.

Parameters:
  • model – A model object that contains all the bundle model information
  • user – A user which will be ban for this nft
comment(model)[source]

This function use to comment on a message.

Parameters:model – A model object that contains all the bundle model information
feeds()[source]

This function get NFT feeds

like(model)[source]

This function use to like an NFT or message

Parameters:model – A model object that contains all the bundle model information
memberships(user=None, details=True)[source]

This function get NFT memberships

Parameters:
  • user – String value to filter the records
  • details – Boolean value which can be true/false
messages(params)[source]

This function get NFT messages

Parameters:params – it is a dictionary which used to filter the records
post(model)[source]

This function use to post a message.

Parameters:model – A model object that contains all the bundle model information
remove(model)[source]

This function use to remove a message on nft

Parameters:model – A model object that contains all the bundle model information
reply(model)[source]

This function use to reply to a message.

Parameters:model – A model object that contains all the bundle model information
unban(model, user=None)[source]

This function use unban a user from a message stream.

Parameters:
  • model – A model object that contains all the bundle model information
  • user – A user which will be ban for this nft
unlike(model)[source]

This function use to unlike an NFT or message

Parameters:model – A model object that contains all the bundle model information

Indices and tables