wiki:SwipeBasedGameForTimeline/doc

Version 20 (modified by fcalado, 2 years ago) (diff)

--

Questions:

1 - Answers as names:

What's the name of this app? (showing app icon)

Answers: NameA, NameB;


2 - Answers as icons:

2.1 - Which icon belongs to [APPNAME]?

Answers: IconA, IconB;

2.2 - Which of this is the most popular among users of this app? (showing app icon)

Answers: IconA, IconB;


3 - Answers as icons and names:

3.1 - Which of these is more popular in your country?

Answers: IconA+NameA, IconB+NameB;[[BR]

3.2 - Which of this is the most popular among users of this app? (showing app icon+name)

Answers: IconA+NameA, IconB+NameB;


Question Json

Question type 1:

{
        "type": "GAME",
        "data": {
          "uid": "1234",
          "timestamp": "2017-07-21 03:12:29",
          "questionType": 1,
          "question": "What's the name of this app?",
          "answerUrl": "[ENDPOINTURL]",
          "app": {
            "id": 30439771,
            "name": "Clash Royale",
            "package": "com.supercell.clashroyale",
            "uname": "clash-royale",
            "size": 95052000,
            "icon": "http://pool.img.aptoide.com/app-free-group/fc255df60a352a0e1c5fa506db267424_icon.png",
            "graphic": "http://pool.img.aptoide.com/app-free-group/703a3f5ff2d93671f8fe7e584bad4bd7_fgraphic_705x345.png",
            "added": "2017-07-13 17:12:33",
            "modified": "2017-07-13 17:12:33",
            "updated": "2017-08-07 09:07:19",
            "uptype": "regular",
            "store": {
              "id": 1242182,
              "name": "app-free-group",
              "avatar": "http://pool.img.aptoide.com/app-free-group/4d51e2cd272bb3877cbbdbaa001bd8a3_ravatar.png",
              "appearance": {
                "theme": "black",
                "description": "Website:http://www.appfreeco.com"
              },
              "stats": {
                "apps": 212,
                "subscribers": 42587,
                "downloads": 13196799
              }
            },
            "file": {
              "vername": "1.9.3",
              "vercode": 170,
              "md5sum": "a7db708350d0ddce629dccd73901070f",
              "path": "http://pool.apk.aptoide.com/app-free-group/com-supercell-clashroyale-170-30439771-a7db708350d0ddce629dccd73901070f.apk",
              "path_alt": "http://pool.apk.aptoide.com/app-free-group/alt/Y29tLXN1cGVyY2VsbC1jbGFzaHJveWFsZS0xNzAtMzA0Mzk3NzEtYTdkYjcwODM1MGQwZGRjZTYyOWRjY2Q3MzkwMTA3MGY.apk",
              "filesize": 95052000,
              "malware": {
                "rank": "TRUSTED"
              }
            },
            "stats": {
              "downloads": 6250728,
              "pdownloads": 22597964,
              "rating": {
                "avg": 4.64,
                "total": 3490
              },
              "prating": {
                "avg": 4.66,
                "total": 21881
              }
            },
            "has_versions": false,
            "obb": null
          },
          "wrongAnswer": [
            {
              "name": "Clash of Clans",
              "icon": "wrong.png",
              "url": "[ENDPOINTURL]"
            }
          ],
          "ab": null
        }
      }


Question Type 2:

{
        "type": "GAME",
        "data": {
          "uid": "1235",
          "timestamp": "2017-07-21 03:12:29",
          "questionType": 2,
          "question": "Which icon belongs to",
          "answerUrl": "[ENDPOINTURL]",
          "app": {
            "id": 31096160,
            "name": "Messenger",
            "package": "com.facebook.orca",
            "uname": "messenger",
            "size": 50254646,
            "icon": "http://pool.img.aptoide.com/mark8/76e0376928b8393227a150fbed5d6b4a_icon.png",
            "graphic": "http://pool.img.aptoide.com/mark8/9fca58431c7bfc7c7b506a3d2805e4fa_fgraphic_705x345.jpg",
            "added": "2017-08-03 19:05:10",
            "modified": "2017-08-03 19:05:10",
            "updated": "2017-08-07 10:46:41",
            "uptype": "regular",
            "store": {
              "id": 65518,
              "name": "mark8",
              "avatar": "http://pool.img.aptoide.com/mark8/3bf5adf05843f9f28c486d5ddef8f873_ravatar.jpg",
              "appearance": {
                "theme": "lightsky",
                "description": ""
              },
              "stats": {
                "apps": 3128,
                "subscribers": 486955,
                "downloads": 262317784
              }
            },
            "file": {
              "vername": "130.0.0.6.89",
              "vercode": 67042533,
              "md5sum": "f99edbf88c48f94738d284496e01b1d2",
              "path": "http://pool.apk.aptoide.com/mark8/com-facebook-orca-67042533-31096160-f99edbf88c48f94738d284496e01b1d2.apk",
              "path_alt": "http://pool.apk.aptoide.com/mark8/alt/Y29tLWZhY2Vib29rLW9yY2EtNjcwNDI1MzMtMzEwOTYxNjAtZjk5ZWRiZjg4YzQ4Zjk0NzM4ZDI4NDQ5NmUwMWIxZDI.apk",
              "filesize": 50254646,
              "malware": {
                "rank": "TRUSTED"
              }
            },
            "stats": {
              "downloads": 5180902,
              "pdownloads": 47538831,
              "rating": {
                "avg": 4.54,
                "total": 2012
              },
              "prating": {
                "avg": 4.35,
                "total": 8091
              }
            },
            "has_versions": false,
            "obb": null
          },
          "wrongAnswer": [
            {
              "name": "wrong",
              "icon": "http://pool.img.aptoide.com/lonerfox2013/22f343d43ae7955c73a4bda8408497d0_icon.png",
              "url": "[ENDPOINTURL]"
            }
          ],
          "ab": null
        }
      }


Question Type 3:

{
        "type": "GAME",
        "data": {
          "uid": "1236",
          "timestamp": "2017-07-21 03:12:29",
          "question": "Which of these is the most popular among users of this app? ",
          "questionType": 3,
          "answerUrl": "[ENDPOINTURL]",
          "app": {
            "id": 29929168,
            "name": "Hearthstone",
            "package": "com.blizzard.wtcg.hearthstone",
            "uname": "hearthstone",
            "size": 1133914505,
            "icon": "http://pool.img.aptoide.com/tapgerinestore/46565567f350627654b191c61e0a269c_icon.png",
            "graphic": "http://pool.img.aptoide.com/tapgerinestore/06dc3b8bd86947de6fc079e6db2679ed_fgraphic_705x345.png",
            "added": "2017-06-30 10:00:34",
            "modified": "2017-06-30 10:00:34",
            "updated": "2017-08-07 00:28:59",
            "uptype": "regular",
            "store": {
              "id": 886549,
              "name": "tapgerinestore",
              "avatar": "http://pool.img.aptoide.com/tapgerinestore/3bf5adf05843f9f28c486d5ddef8f873_ravatar.jpg",
              "appearance": {
                "theme": "default",
                "description": ""
              },
              "stats": {
                "apps": 3449,
                "subscribers": 887,
                "downloads": 305039
              }
            },
            "file": {
              "vername": "8.2.19632",
              "vercode": 1963200,
              "md5sum": "eadfd897851ed4da101d66b3f992a64e",
              "path": "http://pool.apk.aptoide.com/tapgerinestore/com-blizzard-wtcg-hearthstone-1963200-29929168-eadfd897851ed4da101d66b3f992a64e.apk",
              "path_alt": "http://pool.apk.aptoide.com/tapgerinestore/alt/Y29tLWJsaXp6YXJkLXd0Y2ctaGVhcnRoc3RvbmUtMTk2MzIwMC0yOTkyOTE2OC1lYWRmZDg5Nzg1MWVkNGRhMTAxZDY2YjNmOTkyYTY0ZQ.apk",
              "filesize": 82793207,
              "malware": {
                "rank": "TRUSTED"
              }
            },
            "stats": {
              "downloads": 5440,
              "pdownloads": 352086,
              "rating": {
                "avg": 3.78,
                "total": 9
              },
              "prating": {
                "avg": 4.43,
                "total": 288
              }
            },
            "has_versions": false,
            "obb": null
          },
          "wrongAnswer": [
            {
              "name": "Clash of Clans",
              "icon": "http://pool.img.aptoide.com/app-free-group/eadd3d8488d753a715be7f4384b9e4fc_icon.png",
              "url": null
            },
            {
              "name": "Pokémon GO",
              "icon": "http://pool.img.aptoide.com/mark8/33c421676b5d002ecff2fa65442bf415_icon.png",
              "url": "[ENDPOINTURL]"
            }
          ],
          "ab": null
        }
      }

Game Calls

1 - [REQUEST] http://ws75.aptoide.com/api/7/user/timeline/game/setScore/

Sends answer status to server after question has been answered;


2 - [REQUEST] http://ws75.aptoide.com/api/7/user/timeline/game/getLeaderboard

Sends what type of leaderboard to display to server as well as the number of entries we want to display;


Game Call JSON

1 - REQUEST

{
  (DEFAULT APTOIDE REQUEST FIELDS)
  "response": true,
  "uid": 1236
}


RESPONSE

{
  "info": {
    "status": "OK",
    "time": {
      "seconds": 2.8417358398438,
      "human": "2.842 seconds"
    }
  },
  "data": {
    "uid": 1236,
    "score": 100,
    "leaderboard": [
      {
        "name": "Better player",
        "position": 99,
        "score": 200
      },
      {
        "name": "me",
        "position": 100,
        "score": 100
      },
      {
        "name": "Worse Player",
        "position": 101,
        "score": 50
      }
    ]
  }
}


2 - REQUEST

{
  "filter": "friends",
  "offset": 0,
  "limit": 10
}


RESPONSE

{
  "leaderboard":[{
    "name": "P1",
    "position": 50,
    "score":100
  },
  {
    "name": "P2",
    "position": 51,
    "score":90
  },
  {
    "name": "P3",
    "position": 52,
    "score":80
  },
  {
    "name": "P4",
    "position": 53,
    "score":70
  },
  {
    "name": "user",
    "position": 54,
    "score":60
  },
  {
    "name": "P5",
    "position": 55,
    "score":50
  },
  {
    "name": "P6",
    "position": 56,
    "score":40
  },
  {
    "name": "P7",
    "position": 57,
    "score":30
  },
  {
    "name": "P8",
    "position": 58,
    "score":20
  },
  {
    "name": "P9",
    "position": 59,
    "score":10
  }]
}