• Resolved yoxalld

    (@yoxalld)


    I am trying to use the www.ads-software.com API to be able to check version numbers of plugins found on .org. I have looked at the docs but there is very little information about using the plugin API. I am trying to use version 1.2 because it uses GET requests and I am using CURL to hit the API. But there doesn’t seem to be any reference for what fields are acceptable or how to format the request.

    Based on the documentation that was linked to (here, and here) I have tried the following without any luck.

    https://api.www.ads-software.com/plugin/info/1.2/?action=plugin_information&request%5Bslug%5D=ninja-forms

    https://api.www.ads-software.com/plugins/info/1.2/?action=plugin_information&reqest[slug]=ninja-forms

    https://api.www.ads-software.com/plugins/info/1.2/?action=plugin_information&slug=ninja-forms

    https://api.www.ads-software.com/plugins/info/1.2/ninja-forms/?action=plugin_information

    The closest I got was with this:
    https://api.www.ads-software.com/plugins/info/1.2/?action=plugin_information
    but I get this as a response:
    {"error":"Plugin slug not provided."}

    I also looked at the plugins_api() as a reference and tried to reverse engineer how it might work (which is where I got the attempt at the top of the list above from) but am having no luck.

    I’m not sure where else to look and have no idea how the formatting for this is meant to work so a bit of help would be greatly appreciated.

    Thanks!

    • This topic was modified 5 years, 1 month ago by yoxalld.
Viewing 10 replies - 1 through 10 (of 10 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    You have a typo in request ??

    https://api.www.ads-software.com/plugins/info/1.2/?action=plugin_information&request[slug]=ninja-forms

    Works.

    You had reqest

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    A somewhat simpler means is to use the older 1.0 endpoints.

    https://api.www.ads-software.com/plugins/info/1.0/ninja-forms.json

    For example.

    Thread Starter yoxalld

    (@yoxalld)

    @ipstenu That explains a lot, thanks!

    @otto42 That could also work, I didn’t realize that was an option.

    If I only needed to grab the version number how would I format that request?

    Thanks!

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Towards what end? What are you trying to do with the version number? There may be an easier way already (like using the update check API…)

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    The version is in that default response, right after the slug.

    If you want to reduce the amount of default data you get back, you can send what fields to exclude like so:

    
    https://api.www.ads-software.com/plugins/info/1.0/ninja-forms.json?fields=-added,-compatibility,-downloaded,-description,-download_link,-donate_link,-homepage,-last_updated,-rating,-ratings,-requires,-requires_php,-sections,-short_description,-tags,-tested,-icons,-active_installs,-banners,-reviews,-contributors
    

    That is about as much removal of those as you can do.

    Thread Starter yoxalld

    (@yoxalld)

    @ipstenu I am trying to set up some automated events with my local environment and it’s being done via bash scripting so the php api calls aren’t an option.

    @otto42 that could work. I can parse out the single piece of information I need from the larger set. I just wanted to make sure there wasn’t a simpler way to just ask for the piece of information I needed. The documentation was very sparse so it wasn’t clear what was available.

    It seems like version 1.2 would have the ability to request only specific pieces of info, but again there is no documentation so I don’t know how the API is set to respond.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    The API is set to respond to queries from the WordPress software. It’s not meant for general public usage or to be a general way into our systems.

    If you need the data, you’re welcome to it, but it isn’t intended for you or your batch inquiries, it is intended for WordPress installs to get the data they need to display things to users.

    anonymized-11892634

    (@anonymized-11892634)

    It’s not meant for general public usage or to be a general way into our systems.

    @otto42, it might be worth adding this to the description at the top of https://codex.www.ads-software.com/www.ads-software.com_API. Currently it isn’t clear, and could help to curb expectations. Speaking from my own perspective, finding this thread has made me change direction for a particular project which would have used the API in an unsuitable way.

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    @philclothier We’re okay with the existing wording.

    Hello,

    Could someone help me out with this API code?
    Would like (if possible) to add this to a custom html widget box in the Footer.

    Public API V1

    Overview

    The YEM Exchange API v1 is a basic REST API that users can use to retrieve market data. The API, for ease, is mostly compatible with similar simple APIs made by other major exchanges. API calls are limited to 2 requests per second, with any request exceeding the rate limit denied by an https 503 response. All API responses are valid JSON arrays.

    API Functions

    1. Market Stats
    2. Live Trading Data
    3. Live Order Book Data

    Market Stats

    https://yemexchange.com/statistics.php?pair={COIN}-{EXCHANGE}
    Function: Provides stats for a single specific market. Data Refresh: every minute.

    Example: https://yemexchange.com/statistics.php?pair=YEM-USD

    JSON Response

    {
    “status”:”ok”,
    “LastTrade”:”2.200″,
    “24hourHigh”:”2.200″,
    “24hourLow”:”2.123″,
    “24hourVolume”:”1056732.62″
    }

    Thank you very much,

    Marc

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Using the www.ads-software.com API’ is closed to new replies.