RiiTag-Next icon indicating copy to clipboard operation
RiiTag-Next copied to clipboard

Public API

Open Brawl345 opened this issue 3 years ago • 5 comments

There should be a public API where developers can read the tag info in a machine-readable format. This should be read-only for now, maybe with support for API keys so bots can't scrape just every user. I'm currently deciding on the data structure:

Example data structure

{
   "NOTE":"!!! This API is still in BETA and some fields may be removed in the future !!!",
   "user":{
      "id":"111",
      "name":"Brawl",
      "coins":30,
      "avatar_url":"https://cdn.discordapp.com/avatars/111...",
      "profile_url":"http://localhost:3000/user/110806999020625920",
      "member_since":"2021-11-29T20:46:56.782Z"
   },
   "mii":{
      "type":"upload",
      "data":"04c004....",
      "cmocEntryNo":null
   },
   "tag":{
      "url":{
         "normal":"http://localhost:3000/110806999020625920/tag.png",
         "max":"http://localhost:3000/110806999020625920/tag.max.png"
      },
      "settings":{
         "comment":"Some Comment",
         "flag":"de",
         "overlay":"overlay6",
         "background":"mac12.png",
         "coin":"mario",
         "font":"default",
         "coverType":"cover3D",
         "coverRegion":"EN",
         "showAvatar":true,
         "showMii":true
      }
   },
   "games":[
      {
         "game_id":"RMCE01",
         "console":"wii",
         "name":"Mario Kart Wii",
         "region":"US",
         "cover_url":"http://localhost:3000/api/cover/wii/RMCE01",
         "played_on":"2022-08-09T17:12:22.795Z"
      },
      {
         "game_id":"RSBJ01",
         "console":"wii",
         "name":"大乱闘スマッシュブラザーズX",
         "region":"JA",
         "cover_url":"http://localhost:3000/api/cover/wii/RSBJ01",
         "played_on":"2022-08-09T16:45:39.985Z"
      }
   ]
}

Undecided if I should also include the URLs to the assets (e.g. backgrounds, overlays, etc.) directly, but I think it's unnecessary.

Brawl345 avatar Aug 09 '22 17:08 Brawl345

+1

Volukot avatar Jun 08 '23 23:06 Volukot

The API blocks requests from my github, if you want to know your api link, it is: https://tag.rc24.xyz/api/user/<discord_id>

E.g. My API link is: https://tag.rc24.xyz/api/user/789872551731527690

Santabo avatar Jul 09 '24 16:07 Santabo

Keep in mind that this is not a public API and should not be used. It's strictly internal, an implementation detail from Next.js. I'm no longer working on RiiTag and it will be replaced in the near future so you should ask the WiiLink guys if they intend to make a public API for their replacement service.

Brawl345 avatar Jul 09 '24 16:07 Brawl345

@Brawl345

Keep in mind that this is not a public API and should not be used. It's strictly internal, an implementation detail from Next.js. I'm no longer working on RiiTag and it will be replaced in the near future so you should ask the WiiLink guys if they intend to make a public API for their replacement service.

I don't know how to contact them, this is the right repo, right?

Santabo avatar Jul 09 '24 17:07 Santabo

It's the repo for the current site, yes. I don't know if any of them reads here. You could also try their Discord.

Brawl345 avatar Jul 09 '24 17:07 Brawl345