Skip to content

tzmst/Argon-SDK---Readme

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Argon SDK - Version 1.0


Description: Android library for Argon API

Argon SDK Setup

To start using the Argon SDK you first need to do:

Copy the argonsdk.jar to your project libs folder

Argon SDK initialization

Steps needed to initialize the sdk ####Setup Argon SDK credentials: public class YourApplication extends Application { ... @Override public void onCreate(){ super.onCreate(); ... ArgonSDK.setCredentials(this, YOUR_ARGON_ACCES_TOKKEN, YOUR_ARGON_CLIENT_ID, YOUR_ARGON_CLIENT_SECRET); ... } }

In the project manifest:

...
<application
    android:name=".YourApplication"
...

Running the API functions

In your Activity/Fragment file run the following to types of AsyncRequest to access the API calls:

Argon API Calls

1. Register user:

Ex:

ArgonSDK.registerUser(context, argonUser, new IOnPreExecuteCallback(), new IOnFinishWithUserCallback(), new IOnExceptionCallback());

argonUser - an instance of the ArgonUser Object class - in this object you can set the register parameters of the user.

2. Login user:

Ex:

ArgonSDK.loginUser(context, basicUserFields, new IOnPreExecuteCallback(), new IOnFinishWithUserCallback(), new IOnExceptionCallback());

basicUserFields - and Instance of BasicUserFields, this Object has screenname and password fields needed to login. Login request returns an ArgonUserResponse object.

3. Get user:

Ex:

ArgonSDK.getUser(context, argonUser, new IOnPreExecuteCallback(), new IOnFinishWithUserCallback(), new IOnExceptionCallback());

argonUser - an instance of the ArgonUser Object class - in this object you can set the get information parameters of the user.

4. Update user:

Ex:

ArgonSDK.updateUser(context, argonUser, new IOnPreExecuteCallback(), new IOnFinishWithUserCallback(), new IOnExceptionCallback());

argonUser - an instance of the ArgonUser Object class - in this object you can set the update parameters of the user.

5. Screen name suggestions:

Ex:

ArgonSDK.getScreenNameSuggestion(context, screenName, new IOnPreExecuteCallback(), new IOnFinishWithSuggestionCallback(), new IOnExceptionCallback());

screenName - the username that the user wants to use.

6. Screen name availability:

Checks if the user is available

Ex:

ArgonSDK.getScreenNameAvailability(context, screenName, new IOnPreExecuteCallback(), new IOnFinishWithAvailabilityCallback(), new IOnExceptionCallback());

screenName - the username that the user wants to use.

Argon API Calls - v2

7. List topics:

List topics from server

Ex:

ArgonSDK.listTopics(context, offset, limit,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

offset - number of entries to skip.

limit - number of topics in request (min 0, max 100, default:10)

8. List single topic:

List single topic from server

Ex:

ArgonSDK.listSingleTopic(context, topic,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

topic - instance of Topic Object containing the information to list

9. Create topic:

Create topic

Ex:

ArgonSDK.createTopic(context, topic,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

topic - instance of Topic Object containing the information to create the topic

10. Update topic:

Update topic

Ex:

ArgonSDK.updateTopic(context, topic,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

topic - instance of Topic Object containing the information to update the topic

11. Topic Url Lookup:

Lookup for a topic

Ex:

ArgonSDK.topicUrlLookup(context, topic,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

topic - instance of Topic Object containing the information to lookup for the topic

12. Delete topic:

Delete a specific topic

Ex:

ArgonSDK.deleteTopic(context, topicId,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

topicId - the topic id that you want to delete.

13. Undelete topic:

Undelete a specific topic

Ex:

ArgonSDK.undeleteTopic(context, topic,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

topic - instance of Topic Object containing the information to undelete the specific topic

14. List comments:

List topics from server

Ex:

ArgonSDK.listComments(context, comment,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

comment - instance of Comment object, lists the comments specified in the comment topic id togheter with the limit and offset provided

15. List single topic:

List single comment from server

Ex:

ArgonSDK.listSingleComment(context, comment,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

comment - instance of Comment object, lists the comment specified in the comment topic id togheter with the comment id

16. Create comment:

Create comment

Ex:

ArgonSDK.createComment(context, comment,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

comment - instance of Comment Object containing the information to create the comment for the specified topic id

17. Delete comment:

Delete a specific comment

Ex:

ArgonSDK.deleteComment(context, comment,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

18. Undelete comment:

Undelete a specific comment

Ex:

ArgonSDK.undeleteComment(context, comment,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

19. List ScorePoints:

Lists scoredPoints for a specific user

Ex:

ArgonSDK.listScorePoints(context, limit, offset,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

20. Unkown call:

Make an unkown call to the server. The call is not documented in the standard api

Ex:

ArgonSDK.unkownCall(context, unkownObject,  new IOnPreExecuteCallback(), new IOnFinishWithTopicCallback(), new IOnExceptionCallback());

- unkownObject - an instance of UnkownObject, here you provide the type of call by setting the apiMethod, json information by setting callObject. Togheter with this you have to provide an url for the callUp and the userToken if needed in the request.

21. Reset password:

Reset user password. This sends a sms message to the user on the phone number he registered with. To reset password you can use the screenName or the phone number

Ex:

ArgonSDK.resetPassword(context, screenName,  new IOnPreExecuteCallback(), new IOnFinishWithResetCallback(), new IOnExceptionCallback());

ArgonSDK.resetPassword(context, phoneNumber,  new IOnPreExecuteCallback(), new IOnFinishWithResetCallback(), new IOnExceptionCallback());

- screenName - user screen name.

- phoneNumber - user phone number.

22. Reset password with token:

Resets the password on the server with the received token

Ex:

ArgonSDK.resetPasswordWithToken(context, token, password, passwordConfirmation,  new IOnPreExecuteCallback(), new IOnFinishWithResetWithTokenCallback(), new IOnExceptionCallback());

- screenName - user screen name.

- phoneNumber - user phone number.

The caller callback for the IOnFinishWithResetWithTokenCallback (caller.response) returns an argonUser object

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published