Jump to content

Recommended Posts

Posted
So I have a third part webhost on which I am constructing a Wiki for my modpack. I am curious to know if anyone can provide some documentation or some examples on how to hook into the Technic API so that all pack update or changelogs, etc. can be pulled from the api and updated automatically onto a website. Example would be most helpful, even if it is a simple block of code that pulls the "Latest News" from a modpack's page and echoes it out via php to the thrid party page. Help is appreciated.

I wish I knew why it posted it like that. I don't see the "Use Full Editor" on the new forums.

 

 

 

Posted

I can't provide example code, but here's how to hit the API.  Please be responsible with your API usage- cache information and don't hit the API more than once per hour or so.  We don't want to have to lock it down because people using the API for stuff like this sounds really cool to us, but if people use the API irresponsibly and cost us a lot of money, we'll have to do something about it.

The other thing is that the API is for the launcher first.  We may change it without notice.  We'll help you get acclimated if you ask us about changes in #technic on SynIRC, but your site need to have a backup plan if everything goes sideways because it definitely could.  If us changing the API causes your site to 500, that's on you not us.  Put some guard conditions so that API changes don't bust your site.

First, you need the latest stable launcher build #- http://api.technicpack.net/launcher/version/stable4

You'll use it the build # from that response in all the requests to come.

http://api.technicpack.net/modpack/attack-of-the-bteam?build=<build #>

That will provide basically all the information you need.  Replace attack-of-the-bteam with your own pack's slug.  The feed field will provide what you were asking for.  Runs/Downloads/Ratings is also a thing that many pack owners use from the API.  Currently those numbers are turned off because they were causing slowdowns on the API but they'll be going back up soon.

I hope this helps you put together something interesting!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...