I don't have the slightest clue how to use API's but I know they are useful. Hope to see some cool shit come from this!
[Official] Hack Forums API | Happy 10th Birthday HF |
|
Apr 21, 2017 07:50 PM
(This post was last modified: Apr 21, 2017 07:52 PM by King of Hearts.)
Using a basic curl get is blocking me. Does the firewall require specific headers or proper useragents to be sent?
Edit: Yes, just setting a proper user agent fixes the firewall block. (Apr 21, 2017 07:50 PM)King of Hearts Wrote: Using a basic curl get is blocking me. Does the firewall require specific headers or proper useragents to be sent? I wonder how that'll work with datacenters being blocked and such. (Apr 21, 2017 07:51 PM)Charger Wrote: I wonder how that'll work with datacenters being blocked and such. Yup, I'm sure Omni might have a solution. This was released earlier than intended I think. But yes, accessing the API through a datacenter IP does not work atm.
Apr 21, 2017 07:53 PM
(This post was last modified: Apr 21, 2017 07:57 PM by +Haze.)
Is there a place or subforum where we can leave feedback on the API and how it could be potentially improved. For example, I've just glanced at the API and all seems good, but there are ways in which the API is implemented that makes it harder for people to utilise/read the response returned from the server. For example, the API call
Code https://hackforums.net/apicall.php?key=API_KEY_HERE&cat=2returns this response Spoiler (Click to View) the reason why this is a bit of a problem for developers is that, the "children" node on the JSON data is not an array and thus harder to parse since the ID numbers are dynamic. For example, in a language like C# or Java, it would be harder to compute the dynamic name of each key since it's different for each forum. I would just recommend Omni to alter the children node to be an array, whereby the Id is part of the json object. This way, it's easier for us parse since we can easily use a for loop. I see this pattern is existence is many other places in the API so maybe it's due to the way tables are in the DB or the way the code of the mybb forum is. Also, I would like to suggest we are able to change/generate a new key or delete it all together, I suppose this would be to improve security in the event a key is compromised, or in the event the user generated a key and would like to delete it all together. Thanks. Other than that, I think this is a good addition and it allows members to contribute and design their own programs. Also, it can be a way to get people more into programming xD. (Apr 21, 2017 07:53 PM)King of Hearts Wrote: Yup, I'm sure Omni might have a solution. This was released earlier than intended I think. I posted your statement on his thread. I'm sure he already has a plan.
Apr 21, 2017 08:00 PM
(This post was last modified: Apr 21, 2017 08:00 PM by SIM-2015410.)
(Apr 21, 2017 07:53 PM)+Haze Wrote: Is there a place or subforum where we can leave feedback on the API and how it could be potentially improved. For example, I've just glanced at the API and all seems good, but there are ways in which the API is implemented that makes it harder for people to utilise/read the response returned from the server. For example, the API call Do you want it to be more like that TID call where it lists reply IDs before giving the array of replies? like this one does: https://hackforums.net/apicall.php?key=X...id=5605411 (Apr 21, 2017 07:57 PM)Tɦɛ Gʀiɱ Wrote: Never thought I'd regret getting repkilled :( Tell me about it, the pain haha
Apr 21, 2017 08:07 PM
(This post was last modified: Apr 21, 2017 08:07 PM by ๖ۣۜVenom.)
This is actually cool and the possibilities are endless. Can't wait for some type of functioning mobile app.
|
|
|





![[Image: f4hRdFS.gif]](https://i.imgur.com/f4hRdFS.gif)
![[Image: xITDbw2.gif]](https://i.imgur.com/xITDbw2.gif)
![[Image: signature.png]](https://altpocket.io/altpocket/signature.png)