adafruit_pastebin.pastebin
¶
Pastebin API for PasteBin.com
Author(s): Alec Delaney
- class adafruit_pastebin.pastebin.ExpirationSetting¶
Enum-like class for expiration settings.
Valid options are:
NEVER
TEN_MINUTES
ONE_HOUR
ONE_DAY
ONE_WEEK
TWO_WEEKS
ONE_MONTH
SIX_MONTHS
ONE_YEAR
- class adafruit_pastebin.pastebin.PasteBin(session: Session, auth_key: str)¶
Pastebin API for PasteBin.com.
- Parameters:
session (Session) – An :py:class:~`adafruit_requests.Session` to use for web connectiviy
auth_key (str) – The PasteBin.com dev key to use for API accessibilty
- paste(content: SupportsStr, *, name: str | None = None, content_format: str | None = None, privacy: str = '0', expiration: str = 'N') str ¶
Paste content to PasteBin.com and return the URL of the new paste.
- Parameters:
content – Any string (or object that can be converted to a string) to paste
name (str|None) – (Optional) A name for paste
content_format (str|None) – (Optional) The formatting of the pasted content; valid formats can be found in the PasteBin.com API docs
privacy (str) – (Optional) The privacy setting of the paste, which must be a valid option from
PrivacySetting
; default is publicexpiration (str) – (Optional) When the paste will expire and be deleted, which must be a valid option from
ExpirationSetting
; default is never
- class adafruit_pastebin.pastebin.PrivacySetting¶
Enum-like class for privacy settings.
Valid options are:
PUBLIC
UNLISTED
PRIVATE
adafruit_pastebin.gist
¶
Pastebin API for GitHub Gists
Author(s): Alec Delaney
- class adafruit_pastebin.gist.Gist(session: Session, auth_key: str)¶
Pastebin API for GitHub Gists.
- Parameters:
session (Session) – An :py:class:~`adafruit_requests.Session` to use for web connectiviy
auth_key (str) – The GitHub Personal Access Token to use for authentication
adafruit_pastebin.adafruit_io
¶
Pastebin API for Adafuit IO
Author(s): Alec Delaney