2B Local API
2B Local API documentation.
auth
login > create
Check the credentials and return the REST Token if the credentials are valid and authenticated. Calls Django Auth login method to register User ID in Django session framework Accept the following POST parameters: email, password Return the REST Framework Token Object's key.
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required | Email address |
password required | Password |
password > change > create
Changes current user's password. Accepts the following POST parameters: old_password, new_password Returns the success/fail message.
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
old_password required | Current password |
new_password required | New password |
password > reset > create
Calls Django Auth PasswordResetForm save method. Accepts the following POST parameters: email Returns the success/fail message.
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
email required | Email address |
blocks
connection-requests
explore
files
guest
explore > comments > list
Get comments list of a public post
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
invitation
local-life
post > list
Get locallife posts list
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
ordering | Which field to use when ordering the results. |
post > read
Get a certain locallife post.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
ordering | Which field to use when ordering the results. |
locations
messenger
create
If Conversation with this participants already exist, get one from DB and return 200 status code instead 201 :param request: :param args: :param kwargs: :return:
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
opponent required |
messages > list
Mark all new messages in conversation as read :param request: :param args: :param kwargs: :return:
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
conversation_pk required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
cursor | The pagination cursor value. |
messages > create
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
conversation_pk required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
text | Message text |
type | Message type |
object_id |
news
post > read
Get a certain news post.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
ordering | Which field to use when ordering the results. |
notifications
device > fcm > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
id | |
name | |
registration_id required | |
device_id | ANDROID_ID / TelephonyManager.getDeviceId() (e.g: 0x01) |
active | Inactive devices will not be sent notifications |
cloud_message_type | You should choose FCM or GCM |
application_id | Opaque application identity, should be filled in for multiple key/certificate access |
device > fcm > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
registration_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
id | |
name | |
registration_id required | |
device_id | ANDROID_ID / TelephonyManager.getDeviceId() (e.g: 0x01) |
active | Inactive devices will not be sent notifications |
cloud_message_type | You should choose FCM or GCM |
application_id | Opaque application identity, should be filled in for multiple key/certificate access |
device > fcm > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
registration_id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
id | |
name | |
registration_id | |
device_id | ANDROID_ID / TelephonyManager.getDeviceId() (e.g: 0x01) |
active | Inactive devices will not be sent notifications |
cloud_message_type | You should choose FCM or GCM |
application_id | Opaque application identity, should be filled in for multiple key/certificate access |
posts
feed > add_to_calendar
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
is_event | |
is_news | |
is_local_update | |
is_draft | |
city_id | Google Place ID. Max length: 255 |
feed > check
Add or delete check to a post.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
is_event | |
is_news | |
is_local_update | |
is_draft | |
city_id | Google Place ID. Max length: 255 |
feed > favorite
Add or or remove post from user's favorites.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
is_event | |
is_news | |
is_local_update | |
is_draft | |
city_id | Google Place ID. Max length: 255 |
feed > join
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
is_event | |
is_news | |
is_local_update | |
is_draft | |
city_id | Google Place ID. Max length: 255 |
feed > like
Add or delete like to a post.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
is_event | |
is_news | |
is_local_update | |
is_draft | |
city_id | Google Place ID. Max length: 255 |
feed > reminder
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
is_event | |
is_news | |
is_local_update | |
is_draft | |
city_id | Google Place ID. Max length: 255 |
feed > checks > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
feed > checks > create
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
id required | |
username required | |
first_name required | |
avatar required |
feed > comments > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
feed > comments > create
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
text required | Maximum length is 1000 symbols |
user_links |
feed > comments > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required | |
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
text required | Maximum length is 1000 symbols |
user_links |
feed > comments > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required | |
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
text | Maximum length is 1000 symbols |
user_links |
feed > comments > replies > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required | |
comment_pk required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
feed > comments > replies > create
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required | |
comment_pk required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
text required | Maximum length is 1000 symbols |
user_links |
feed > comments > replies > update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required | |
comment_pk required | |
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
text required | Maximum length is 1000 symbols |
user_links |
feed > comments > replies > partial_update
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required | |
comment_pk required | |
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
text | Maximum length is 1000 symbols |
user_links |
feed > joins > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
feed > joins > create
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
post_pk required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
id required | |
username required | |
first_name required | |
avatar required |
my > create
Create a post.
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
title required | Maximum length is 255 symbols |
description required | |
tags required | |
categories required | Choose at least one category |
visibility | |
pictures required | |
place required | Google Places API `place_id` value |
lat_lng | Custom place coordinates |
is_local_tip | |
is_local_update | |
is_event | |
is_draft | |
event | |
localupdate | |
city_id | Google Place ID. Max length: 255 |
user_links |
my > update
Update post detail.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
title required | Maximum length is 255 symbols |
description required | |
tags required | |
categories required | Choose at least one category |
visibility | |
pictures required | |
place required | Google Places API `place_id` value |
lat_lng | Custom place coordinates |
is_local_tip | |
is_local_update | |
is_event | |
is_draft | |
event | |
localupdate | |
city_id | Google Place ID. Max length: 255 |
user_links |
my > partial_update
Update post detail.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
title | Maximum length is 255 symbols |
description | |
tags | |
categories | Choose at least one category |
visibility | |
pictures | |
place | Google Places API `place_id` value |
lat_lng | Custom place coordinates |
is_local_tip | |
is_local_update | |
is_event | |
is_draft | |
event | |
localupdate | |
city_id | Google Place ID. Max length: 255 |
user_links |
profile
my > create
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
username required | Maximum length is 100 symbols |
first_name required | Maximum length is 255 symbols |
last_name required | Maximum length is 255 symbols |
avatar | Avatar ID |
info | Text information |
city_special | What makes my city special |
website | |
place required | Google Places API `place_id` value |
my > update
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
username required | Maximum length is 100 symbols |
first_name required | Maximum length is 255 symbols |
last_name required | Maximum length is 255 symbols |
avatar | Avatar ID |
info | Text information |
city_special | What makes my city special |
website | |
place required | Google Places API `place_id` value |
my > partial_update
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
username | Maximum length is 100 symbols |
first_name | Maximum length is 255 symbols |
last_name | Maximum length is 255 symbols |
avatar | Avatar ID |
info | Text information |
city_special | What makes my city special |
website | |
place | Google Places API `place_id` value |
my > wishlist > list
ViewSet for managing wishlists including CRUD operations and custom actions.
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
search | A search term. |
my > wishlist > read
ViewSet for managing wishlists including CRUD operations and custom actions.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this wishlist. |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
search | A search term. |
my > wishlist > add_post
ViewSet for managing wishlists including CRUD operations and custom actions.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this wishlist. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name required | |
is_private | |
is_default |
my > wishlist > partial_updates
Update the name and/or privacy status of a wishlist.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this wishlist. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name | |
is_private | |
is_default |
my > wishlist > remove_post
ViewSet for managing wishlists including CRUD operations and custom actions.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
id required | A unique integer value identifying this wishlist. |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
name required | |
is_private | |
is_default |
my > wishlist > posts > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
wishlist_pk required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
category | |
city | |
place_id |
profiles
connect > create
Send friendship request to profile or remove friendship.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
username required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
username required | Maximum length is 100 symbols |
first_name required | Maximum length is 255 symbols |
last_name required | Maximum length is 255 symbols |
avatar required | |
info | Text information |
city_special | What makes my city special |
website | URL |
interests required | |
top_things required | |
connection_status required | |
is_followed required |
follow > create
Follow or unfollow user.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
username required |
Request Body
The request body should be a "application/json"
encoded object, containing the following items.
Parameter | Description |
---|---|
username required | Maximum length is 100 symbols |
first_name required | Maximum length is 255 symbols |
last_name required | Maximum length is 255 symbols |
avatar required | |
info | Text information |
city_special | What makes my city special |
website | URL |
interests required | |
top_things required | |
connection_status required | |
is_followed required |
posts > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
profile_username required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
category | |
city | |
city_id | |
place_id |
wishlist > posts > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
wishlist_pk required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
category | |
city | |
place_id |
wishlist > public > list
ViewSet for managing wishlists including CRUD operations and custom actions.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
profile_username required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
reports
search
cities > events > list
Find Event posts in certain city. Find Friends Event posts in certain city. Query Param: action (optional) = "local_events" or "friends_events"
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
city_place_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
category |
cities > fof > list
Find friends of friends posts in certain city.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
city_place_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
category |
cities > friends > list
Find friends posts in certain city.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
city_place_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
category |
cities > local-life > list
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
city_place_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
cities > locals > list
Find profile in certain city.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
city_place_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
search | Search in first_name, last_name, username. |
cities > news > list
Find News posts in certain city.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
city_place_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
page_size | Number of results to return per page. |
cities > posts > list
Find posts in certain city.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
city_place_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
category |
locations > posts > list
Find posts in certain location.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
location_place_id required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
category |
tags > posts > list
Find posts in certain city.
Path Parameters
The following parameters should be included in the URL path.
Parameter | Description |
---|---|
tag_slug required |
Query Parameters
The following parameters should be included as part of a URL query string.
Parameter | Description |
---|---|
page | A page number within the paginated result set. |
city | |
category |