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!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...