People API¶
User¶
-
class
people.
User
¶ Represents user details (email, username, balance, etc.)
-
static
create
(*args, **kwargs)¶ Creates a new User instance.
Parameters: - email (str) – The new account’s email.
- username (str) – The new account’s username.
- password (str) – The new account’s password.
-
static
profile
()¶ Retrieves the details of a given Profile instance.
-
static
Deposit¶
-
class
people.
Deposit
¶ A deposit into a user’s account.
-
static
create
(*args, **kwargs)¶ Creates a new Deposit instance. Must visit https://people-api-server.herokuapp.com/register prior to set profile’s stripeAccountId.
Parameters: - stripeToken (int) – A Stripe token representing a valid card.
- amount (int) – The amount of the deposit in cents.
-
static
list
(*args, **kwargs)¶ Retrieves all Deposit instances associated with the current user.
-
static
read
(*args, **kwargs)¶ Retrieves the details of a given Deposit instance.
Parameters: id (str) – The id of the deposit.
-
static
Transfer¶
-
class
people.
Transfer
¶ -
static
create
(*args, **kwargs)¶ Creates a new Transfer instance. Must visit https://people-api-server.herokuapp.com/register prior to set profile’s stripeAccountId.
Parameters: amount (int) – The amount of the transfer in cents.
-
static
list
(*args, **kwargs)¶ Retrieves all Transfer instances associated with the current user.
-
static
read
(*args, **kwargs)¶ Retrieves the details of a given Transfer instance.
Parameters: id (str) – The id of the transfer.
-
static
Query¶
-
class
people.
Query
¶ -
static
create
(*args, **kwargs)¶ Creates a new Query instance.
Parameters: - text (str) – The text to be included in the query.
- regex (
str
, optional) – A regex the response must match to be valid. Defaults to ‘.*’. - callback (
str
, optional) – The url for the Response to be POSTed to. Defaults to None. - bid (
int
, optional) – The bid price for the Response in cents. Defaults to 1.
-
static
get
(*args, **kwargs)¶ Requests an unanswered Query compatible with the current user.
-
static
list
(*args, **kwargs)¶ Retrieves all Query instances associated with the current user.
-
static
read
(*args, **kwargs)¶ Retrieves the details of a given Query instance.
Parameters: id (str) – The id of the query.
-
static
Response¶
-
class
people.
Response
¶ -
static
create
(*args, **kwargs)¶ Creates a new Response instance.
Parameters: - text (str) – The text for the response.
- query (str) – The id of the target query.
-
static
list
(*args, **kwargs)¶ Retrieves all Response instances associated with the current user.
-
static
read
(*args, **kwargs)¶ Retrieves the details of a given Response instance.
Parameters: id (str) – The id of the response.
-
static
Rating¶
-
class
people.
Rating
¶ -
static
create
(*args, **kwargs)¶ Creates a new Rating instance.
Parameters: - satisfactory (bool) – True if the response is satisfactory, False otherwise.
- response (str) – The id of the response.
-
static
destroy
(*args, **kwargs)¶ Deletes a given Rating instance.
Parameters: id (str) – The id of the rating.
-
static
list
(*args, **kwargs)¶ Retrieves all Rating instances associated with the current user.
-
static
read
(*args, **kwargs)¶ Retrieves the details of a given Rating instance.
Parameters: id (str) – The id of the rating.
-
static
Attribute¶
-
class
people.
Attribute
¶ A key-value relationship representing a profile attribute. E.g. ‘education’: ‘university of california, berkeley’
-
static
create
(*args, **kwargs)¶ Creates a new Attribute instance.
Parameters: - key (str) – The attribute tag.
- value (str) – The attribute value.
-
static
destroy
(*args, **kwargs)¶ Deletes a given Attribute instance.
Parameters: id (str) – The id of the attribute.
-
static
list
(*args, **kwargs)¶ Retrieves all Attribute instances associated with the current user.
-
static
read
(*args, **kwargs)¶ Retrieves the details of a given Attribute instance.
Parameters: id (str) – The id of the attribute.
-
static