You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In general this will update the SDK to version 1.1 being compatible with the Tapglue API 0.4.
UGC API with Posts, Comments & Likes
New Feed API with Newsfeed, Posts Feed & Events Feed
New Connections API with Friends Confirmation
Multi-User Search (by Email & SocialIds)
Queries for all Feeds
Add tests for new methods
Add new functions to sample app (posts & comments only)
As in the project before. The iOS SDK is the template/blueprint for the Implementation if the following document is missing specification details. The documentation regarding the iOS details can be found here.
New models
The new models for this API version contain:
Posts
Comments
Likes
The specification and attributes of the new entities are below.
New Endpoints
The endpoints that are currently missing are specified in this document. This document the most important in this specification as it shows all the gaps and differences in the current Android SDK.
Naming inconsistencies are also marked (red) in that document. They should be aligned with the iOS SDK API, wherever reasonable.
Basic
This section describes the basic changes that need to be done.
Version
Update SDK version everywhere from 1.0 to 1.1.0
User
Add setUnhashedPassword method to user to set a password that is not PBKDF2 hashed.
Event
Add the string attribute tg_object_id to the events model.
Restructuring
Change Tapglue.connections() to Tapglue.connection() (singular to be consistent)
Move following methods from feed() to connection():
currently we support text and url as the type. In the future we will allow more types such as audio, video, image etc. In this case content will always be a url.
Read only
Key
Type
Description
Example
id
string
Id of the post
"id": "12743631303647839"
user_id
string
Id of the user who created post
"user_id": "11286878691041887"
is_liked
bool
Flag wether the posts is liked or not
"is_liked": true
created_at
string
Created at date
"created_at": "2015-11-27T16:03:36.171840385Z"
updated_at
string
Created at date
"updated_at": "2015-11-27T16:03:36.171840478Z
The user of the post should be accessible like in events Post.user.username etc.
We don't return the counts yet. So the values should just be 0 if nothing is being returned from the API. However we will soon enable this feature from our backend
Comments
Write
Key
Type
Description
Example
content
string
Content of the comment
"content": "very nice post!"
Read only
Key
Type
Description
Example
id
string
Id of the like
"id": "12743631303647840"
post_id
string
Id of the post
"id": "12743631303647839"
user_id
string
Id of the user who created post
"user_id": "11286878691041887"
created_at
string
Created at date
"created_at": "2015-11-27T16:03:36.171840385Z"
updated_at
string
Created at date
"updated_at": "2015-11-27T16:03:36.171840478Z
Likes
Read only
Key
Type
Description
Example
id
string
Id of the comment
"id": "12743631303647840"
post_id
string
Id of the post
"id": "12743631303647839"
user_id
string
Id of the user who created post
"user_id": "11286878691041887"
created_at
string
Created at date
"created_at": "2015-11-27T16:03:36.171840385Z"
updated_at
string
Created at date
"updated_at": "2015-11-27T16:03:36.171840478Z
API
Overview of endpoints:
Name
Method
Route
Create Post
POST
/posts
Retrieve Post
GET
/posts/{postID}
Update Post
PUT
/posts/{postID}
Delete Post
DELETE
/posts/{postID}
Retrieve all Posts
GET
/posts
Retrieve Posts Feed
GET
/me/feed/posts
Retrieve my Posts
GET
/me/posts
Retrieve users Posts
GET
/users/{userID}/posts
Name
Method
Route
Create Comment
POST
/posts/{postID}/comments
Update Comment
PUT
/posts/{postID}/comments/{commentID}
Delete Comment
DELETE
/posts/{postID}/comments/{commentID}
Retrieve Comments
GET
/posts/{postID}/comments
Name
Method
Route
Create Like
POST
/posts/{postID}/likes
Delete Like
DELETE
/posts/{postID}/likes
Retrieve Likes
GET
/posts/{postID}/likes
Deletion of likes is idempotent, so there is no id needed.
Besides the default feed() methods above. There should be another additional method that also accepts a query object. The query is a JSON object and need to be attached to endpoint after ?where= clause. Here is an example of a query object:
The query object always contains the field, that is to be checked (i.e. type) followed by the request condition eq and then the value someType. For now, the only request condition is eq but there are more to come in the future. Fields that are checkable are currently:
type
tg_object_id
object -> id
object -> type
As a request condition we currently support two:
eq
in
eq, contains a single string. in contains an array of strings.
Example for in:
{
"type":{
"in":["someType","anotherType"]
}
}
Update tests
Add appropriate tests for the new methods
Update sample app
Add posts, comments & likes to sample app.
The text was updated successfully, but these errors were encountered:
Overview
In general this will update the SDK to version 1.1 being compatible with the Tapglue API 0.4.
As in the project before. The iOS SDK is the template/blueprint for the Implementation if the following document is missing specification details. The documentation regarding the iOS details can be found here.
New models
The new models for this API version contain:
The specification and attributes of the new entities are below.
New Endpoints
The endpoints that are currently missing are specified in this document. This document the most important in this specification as it shows all the gaps and differences in the current Android SDK.
Naming inconsistencies are also marked (red) in that document. They should be aligned with the iOS SDK API, wherever reasonable.
Basic
This section describes the basic changes that need to be done.
Version
1.0
to1.1.0
User
setUnhashedPassword
method to user to set a password that is notPBKDF2
hashed.Event
tg_object_id
to the events model.Restructuring
Tapglue.connections()
toTapglue.connection()
(singular to be consistent)feed()
toconnection()
:Connections
unFriend
tounfriend
unFollow
tounfollow
Tapglue.connection().retrieveConfirmedConncetionsForCurrentUser
Tapglue.connection().retrieveRejectedConncetionsForCurrentUser
Posts, Comments & Likes API
We've added a new API for Posts, Comments on Posts and Likes on Posts and Shares of Posts.
The API now allows the creation of posts. Posts support the basic
CRUD
as well as retrieving a list of posts for different endpoints.Methods
Following methods should be available after the implementation of the Posts API.
Posts
Comments
Likes
Model
The following section describes the models for Posts, Comments and Likes.
Posts
Write
"tags": ["fitness","running"]
"visibility": 30
Attachments example
The attachment structure is always the same:
currently we support
text
andurl
as the type. In the future we will allow more types such as audio, video, image etc. In this case content will always be a url.Read only
"id": "12743631303647839"
"user_id": "11286878691041887"
"is_liked": true
"created_at": "2015-11-27T16:03:36.171840385Z"
"updated_at": "2015-11-27T16:03:36.171840478Z
The user of the post should be accessible like in events
Post.user.username
etc.Addition read only keys for counts are:
We don't return the counts yet. So the values should just be 0 if nothing is being returned from the API. However we will soon enable this feature from our backend
Comments
Write
"content": "very nice post!"
Read only
"id": "12743631303647840"
"id": "12743631303647839"
"user_id": "11286878691041887"
"created_at": "2015-11-27T16:03:36.171840385Z"
"updated_at": "2015-11-27T16:03:36.171840478Z
Likes
Read only
"id": "12743631303647840"
"id": "12743631303647839"
"user_id": "11286878691041887"
"created_at": "2015-11-27T16:03:36.171840385Z"
"updated_at": "2015-11-27T16:03:36.171840478Z
API
Overview of endpoints:
POST
/posts
GET
/posts/{postID}
PUT
/posts/{postID}
DELETE
/posts/{postID}
GET
/posts
GET
/me/feed/posts
GET
/me/posts
GET
/users/{userID}/posts
POST
/posts/{postID}/comments
PUT
/posts/{postID}/comments/{commentID}
DELETE
/posts/{postID}/comments/{commentID}
GET
/posts/{postID}/comments
POST
/posts/{postID}/likes
DELETE
/posts/{postID}/likes
GET
/posts/{postID}/likes
Deletion of likes is idempotent, so there is no id needed.
Post creation
Comment creation
Comment retrieval
Comment deletion
Like creation
Like retrieval
Like deletion
New search methods
We have a new API that allows to search for multiple emails or socialIDs. Examples:
Tapglue.user().searchUsersWithEmails
Tapglue.user().searchUsersWithSocialUserIds
The goal is to implement to new methods:
New feed structure
Due to the introduction of posts, the new feed structure changed a little bit.
The new feeds structure will look like the following:
me/feed
->posts
&events
me/feed/posts
->posts
me/feed/events
->events
for users
me/events
&users/:userID/events
me/posts
&users/:userID/posts
The new
me/feed
will have bothposts
andevents
. The other endpoints have eitherposts
orevents
.The names of the methods should be as follows:
me/feed
->Tapglue.feed().retrieveNewsFeedForCurrentUser
me/feed/posts
->Tapglue.feed().retrievePostsFeedForCurrentUser
me/feed/events
->Tapglue.feed().retrieveEventsFeedForCurrentUser
me/events
->Tapglue.feed().retrieveEventsForCurrentUser
users/:userID/events
->Tapglue.feed().retrieveEventsForUser
me/posts
->Tapglue.feed().retrievePostsForCurrentUser
users/:userID/posts
->Tapglue.feed().retrievePostsForUser
Feed queries
Besides the default
feed()
methods above. There should be another additional method that also accepts a query object. The query is a JSON object and need to be attached to endpoint after?where=
clause. Here is an example of a query object:The query object always contains the field, that is to be checked (i.e. type) followed by the request condition eq and then the value someType. For now, the only request condition is eq but there are more to come in the future. Fields that are checkable are currently:
As a request condition we currently support two:
eq, contains a single string. in contains an array of strings.
Example for in:
Update tests
Update sample app
The text was updated successfully, but these errors were encountered: