-
Notifications
You must be signed in to change notification settings - Fork 1
Asks
Creates a new Ask for a given user.
Does not need to be unique.
If there exists a Give which:
- Is currently unmatched (i.e. neither matched nor fulfilled), and
- Has the same item as this Ask,
Then both this Ask and the Give will have their statuses set to matched
, and they will be connected such that the Give data will contain the match_
fields of the corresponding information of their match, and vice versa.
Example script to call the API
POST
/ask
{
"user_name": String,
"user_email": String,
"user_location": String,
"item": String,
"quantity": Number
}
HTTP Status Code | Meanings |
---|---|
201 Created |
Created the ask succesfully |
500 Internal Server Error |
The server crapped itself |
{
"id": String UUID
}
Returns all Asks from all users.
If the Ask has been matched or fulfilled, it will have the ID of the corresponding match as well as the name, email, and location of the match.
Example script to call the API
GET
/ask
HTTP Status Code | Meanings |
---|---|
200 OK |
Retrieved all Asks successfully |
500 Internal Server Error |
The server crapped itself |
[ array
{
"posted": Number (Unix timestamp)
"id": String UUID,
"user_name": String,
"user_email": String,
"user_location": String,
"item": String,
"quantity": Number,
"status": String,
"match_id": String (Optional),
"match_name": String (Optional),
"match_email": String (Optional),
"match_location": String (Optional)
}
]
For the possible values of status
, see Values.
Sets the status of the Ask (and, if linked, the status of the corresponding Give) to the value fulfilled
.
The resultant status is returned.
Example script to call the API
PUT
/ask/status
{
"id": String
}
HTTP Status Code | Meanings |
---|---|
200 OK |
Updated the status(es) successfully |
500 Internal Server Error |
The server crapped itself |
{
"status": String
}
For the possible values of status
, see Values.
Give+Seek is where we provide unconditionally to those who need assistance and ask without hesitation from those who are kind. A platform for human connection and support when we need it most.
Looking for kindness from those who have compassion to spare? Seek for what you need, when you need it most.
Have resources to help those who rely on you? Give back to the community that cares for you.