Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is there any improvement in the API docs? #7

Open
rafaalvfe opened this issue Apr 25, 2017 · 3 comments
Open

Is there any improvement in the API docs? #7

rafaalvfe opened this issue Apr 25, 2017 · 3 comments

Comments

@rafaalvfe
Copy link

rafaalvfe commented Apr 25, 2017

wondering if there will be more documentation for the API anytime soon

@rafaalvfe rafaalvfe changed the title Is there any improvement ovement Is there any improvement in the API docs? Apr 25, 2017
@alvarolb
Copy link
Member

Yes, we are working on Swagger specification. If you need some specific use case that is currently available from the Cloud Console, you can just open the Chrome developer tools to see the REST API commands sent to the server, as the console is a full Restfull client calling the server.

Hope we can get a formal definition of the whole API soon!

@rafaalvfe
Copy link
Author

when I ask for the device API what does "al" and "fn" mean? what are the possible values?
ex.
{ "light_switch": { "al": 0, "fn": 1 }, "state": { "al": 0, "fn": 3 } }

@alvarolb
Copy link
Member

Hi, al means "access level", andfn is like "function type". The possible values are inside the thinger_resource.hpp from Arduino library:

    enum io_type {
        none                = 0,
        run                 = 1,
        pson_in             = 2,
        pson_out            = 3,
        pson_in_pson_out    = 4
    };

    enum access_type{
        PRIVATE     = 0,
        PROTECTED   = 1,
        PUBLIC      = 2,
        NONE        = 3
    };

However, access level is not currently being used, as all the methods are private by default. The function type only describes if the resource is an input, output, both input/output/, or just a callback (run). This help to the API explorer and dashboards to know what resources are "usable" for some tasks, like using resources in dashboards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants