pastebin library

Classes

AccountNotActive
Corresponds to API response 'Bad API request, account not active'
EmptyApiPasteCode
Corresponds to API response 'Bad API request, api_paste_code was empty'
ExceededMaximumNumberOfPrivatePastes
Corresponds to API response 'Bad API request, maximum number of 10 private pastes for your free account'
ExceededMaximumNumberOfUnlistedPastes
Corresponds to API response 'Bad API request, maximum number of 25 unlisted pastes for your free account'
ExceededMaximumPasteFileSize
Corresponds to API response 'Bad API request, maximum paste file size exceeded'
ExpiredUserKey
Corresponds to API response 'Bad API request, invalid or expired api_user_key'
InsufficientPermissions
Corresponds to API response 'Bad API request, invalid permission to view this paste or invalid api_paste_key' or 'Bad API request, invalid permission to remove paste'
InvalidApiDevKey
Corresponds to API response 'Bad API request, invalid api_dev_key'
InvalidApiOption
Corresponds to API response 'Bad API request, invalid api_option'
InvalidApiPasteExpireDate
Corresponds to API response 'Bad API request, invalid api_paste_expire_date'
InvalidApiPasteFormat
Corresponds to API response 'Bad API request, invalid api_paste_format'
InvalidApiPasteVisibility
Corresponds to API response 'Bad API request, invalid api_paste_private'
InvalidApiUserKey
Corresponds to API response 'Bad API request, invalid api_user_key'
InvalidParameters
Corresponds to API response 'Bad API request, invalid POST parameters'
InvalidRequestVerb
Corresponds to API response 'Bad API request, use POST request, not GET'
InvalidUserCredentials
Corresponds to API response 'Bad API request, invalid login'
NetworkError
Occurs when the connection between the client and the Pastebin API Server fails
NotFound
Occurs when the response status code is 404; Not Found
Paste
Models a Pastebin paste
PastebinClient
Dart API for connecting with Pastebin API. All methods are asynchronous so they return a Future and the results are instances of Either monad so that no errors are thrown.
PasteOptions
Model for available settings of a Paste that can be set
RequestError
Base type for an error that can occur when consuming the Pastebin API
UserInfo
Models the information and settings of Pastebin user

Enums

ApiOption
Options available in Pastebin API
ExpireDate
Possible values for expiration dates of a Pastebin Paste
Format
Possible values for format of a Pastebin Paste
Visibility
Possible values for the visibility of a Pastebin Paste

Functions

withMultipleApiDevKey({required List<String> apiDevKeys}) PastebinClient
Returns an instance of OfficialPastebinClient which takes on multiple Pastebin API developer keys. The difference of this call and withSingleApiDevKey is that by providing multiple api dev keys, if a request fails due to exceeding maximum amount of pastes is reached or the api dev key is invalid the request is resent with a different api dev key.
withSingleApiDevKey({required String apiDevKey}) PastebinClient
Returns an instance of OfficialPastebinClient which takes on a single Pastebin API developer key.