About Leaderboard Service and User Management Service

0 votes

 

Our APP need leaderboard with time, like below

http://666kb.com/i/cmbzqlx84tamle41f.jpg

 

1. Could Leaderboard Service record time format date or other format and rank with it ?

Not only time, as well calories(cal), distance(km) and other units.

If not, are there other ways to achieve it ?

 

2. About User Management Service, what are the limits of create a user name ?

I use some special symbols(like “, ‘, >) to create user name, I get error message “1400 - BAD REQUEST - The Request parameters are invalid. “

So I want to know the rule of create user name.

 

Thank you.

asked Mar 4, 2014 in App42 Cloud API-BaaS by guo (110 points)
recategorized Oct 24, 2014 by sushil

1 Answer

0 votes
 
Best answer

Hi,

1). You can make three different leaderboard one for time, second for calories(cal) and third for distance(Km).

2). For special character we allow almost all special character. Please avoid of using  ("/") while creating user.

answered Mar 4, 2014 by anonymous
selected Mar 4, 2014 by guo
Hi,

Thanks for you reply.

I watch the tutorial of Leaderboard Service - Save User Score, this tutorial just teach user to record the number data, I am trying to record time format data like " 2014-03-04_15:30:23 ", I get error message below

1400 - BAD REQUEST - The Request parameters are invalid.

Could we record time format data in leaderboart and sort with this field ?

Because our APP must record time format data and use leaderboard that sort with time like picture link given above.

Thank you !
Hi,

We donot support score as string , you you cant save time as a string, for saving time you can use code snippet as below.

     $scoreBoard= $api->buildScoreBoardService();
$saveUserObjk= $scoreBoard->saveUserScore("Unity3dLeaderboard","user11",time());

This will save your current local time.
Hi,
Thanks for you reply.
I have other questions.

1. About User Management Service - Authenticate, could we authenticate with email and password ?
We want to authenticate with both userName and Email + password.

2. About Leaderboard Service, could we get total score for the  specific user in specific game ?

3. About Leaderboard Service, could we get the leaderboard with lowest N users
We have a time score(seconds), this score that the lowest is NO.1, so we need get the leaderboard with lowest N users.

4. About Leaderboard Service, will the maximum and minimum scores (ex. -65535 ~ +65535)

Thank you !
Hi,

# For query 1 and 3 we are currently working on php sdk. we we will provide you as soon as possible.

# For query 4 you can use getHighestScoreByUser and getLowestScoreByUser.

# For query 2 you can use getTopRankings method in this you will get all score by user and then you can calculate user score by writing custom method for calculation of total score by user.
Hi,
Thanks for you reply.

A. for question 1, could we authenticate with both userName + password and Email + password on Android, iOS and PHP ?

B. for question 3, will we be able to sort ascending ?
If we have data => 333, 111, 444, 222, 555
The method in tutorial is descending => 555, 444, 333, 222, 111
But we want to sort ascending => 111, 222, 333, 444, 555
Could we sort ascending ?

C. for question 4, perhaps my question was not clear enough. I explain for more detailed for my question.
What range of the data can be stored ?
if 8 bit, the range is in -255 ~ +255
if 16 bit, the range is in -65535 ~ +65535
We want to know the range of score in Leaderboard Service.
 
Thank you !
Hi,

# Query A and B is avail in Android and iOS both, but for PHP we are currently working on it. It will be avail to use as early as possible.

# For Query C we take score in Leaderboard Service as Double.
Hi,
Thanks for you reply.

Q1. In tutorial User Management Service - Authenticate, just authenticate with userName + Password, could you provide api or code with authenticate with Email + Password in Android and iOS both ?
In PHP, could you give me a date ?

Q2. Data type double is 64bit, is the range of leaderboard service score -2^32 ~ +2^32 or 0 ~ +2^64 ?

Q3. Android and iOS can sort ascending, but the tutorial just sort descending, could you provide sort ascending api or code in Android and iOS both ?

Q4. The user of our App has two type data, one is daily data, another is total data, leaderboard service can't give me total data, but we need it, could you give me some suggestion ? (Use other services App42CloudAPI provide or other way)

Thank you !
Hi,

# For query 1 you can use
        Android :  
 HashMap<String, String> otherMetaHeaders = new HashMap<String, String>();
        otherMetaHeaders.put("emailAuth", "true");
        userService.setOtherMetaHeaders(otherMetaHeaders);
        App42Response authenticateObj = userService.authenticate("<your email>",
                "<Your_Password>");

       iOS :
           NSMutableDictionary *otherMetaHeaders = [NSMutableDictionary       dictionaryWithObjectsAndKeys:@"true",@"emailAuth", nil];
       [userServiceObject setOtherMetaHeaders:otherMetaHeaders];
          App42Response *authenticateResult = [userServiceObject authenticateUser:email password:password];

# For query 2 our range is 0 ~ +2^64

# For query 3 code snippet is :

        Android :
        HashMap<String, String> otherMetaHeaders = new HashMap<String, String>();
        otherMetaHeaders.put("orderByAscending", "<Use Key for which ordering is to done>"");
        storage.setOtherMetaHeaders(otherMetaHeaders);

      iOS :
         NSMutableDictionary *otherMetaHeaders = [NSMutableDictionary dictionaryWithObjectsAndKeys:@"<Use Key for which ordering is to done>",@"orderByAscending", nil];
         [storageServiceObject setOtherMetaHeaders:otherMetaHeaders];


# For query 4 to get daily number to data you can use method which having date range in leaderBoard service , to get total data of user you can use method getScoresByUser.
User Management Service can login with EmailID + PassWord, if we Update Email, could we login with new EmailID + PassWord ?
Answer :
Yes, you can.
Download Widgets
Welcome to ShepHertz Product line forum, where you can ask questions and receive answers from the community. You can also reach out to us on support@shephertz.com
...