Coder Social home page Coder Social logo

Comments (5)

tjfontaine avatar tjfontaine commented on July 17, 2024

FWIW the api currently handles unknown methods just fine, so you could call api.nodebalancer_create and things would work as expected. However there's no method documentation or required argument verification for such calls.

I plan to add nodebalancer methods, and also a mechanism to check with the api of the api to handle unknown methods more sanely. There just isn't an ETA of when that will happen.

I will of course happily review any patches or pull requests. Though, I'm more in mind to have a script to auto-generate the bindings than to continue to maintain methods manually.

from linode-python.

rata avatar rata commented on July 17, 2024

Yeah, I started playing today and realised that "it just works". Great! :-D

Also, been looking at the code and it seems it should be scriptable as you say to me too, at least api.py (the one I was looking). I might give it a try later on. But there's no single file containing the API actions and required arguments that Linode updates, right ? Or I just didn't find it ?

Also, one silly question. The code says it is for Linode API v2, although current one is v3 1. And the URL seems a bit different on 1 too: https://api.linode.com/ instead of https://api.linode.com/api/ (note the missing "/api/" at the end). Also, I didn't see the "api_responseFormat" parameter on Linode documentation. Perhaps this uses Linode API v2, which is currently available, and has been dropped on Linode API v3 ? Or have you verified with Linode that it is correct to use all this (the slightly different URL and that parameter) ?

Thanks a lot!

Rodrigo

from linode-python.

rata avatar rata commented on July 17, 2024

Sorry, ignore the "api_responseFormat", I've just seen it :S (this happens when I do a lot of things at the same time :-D)

from linode-python.

tjfontaine avatar tjfontaine commented on July 17, 2024

Right, responseFormat better still be there.

https://api.linode.com/?api_key=abc123&api_action=test.echo&foo=bar is the canonical way to access the api, only the documentation site is under http://www.linode.com/api/

As far as building the bindings with a script the ideal mechanism would be utilizing http://www.linode.com/api/utility/api.spec

The version is still at 2 because it hasn't been updated in a while to match, and there hasn't been a significant change in the behavior on the consumer end. There was a complete rewrite of the api by Linode between v1 and v2.

from linode-python.

rata avatar rata commented on July 17, 2024

So, a simple patch changing the LINODE_API_URL to https://api.linode.com/ is correct, right ? Do you want me to send it or you do it yourself ? (I've just tested it and the API seems to work okay too)

Cool, it sounds nice to create them automatically with that api method. Didn't know about it. If I have time will look into it during the weekend :-)

Ohh, is good to know it is not updated. If something fails (not the case yet), I'll consider this possibility :-)

Thanks a lot!

Rodrigo

from linode-python.

Related Issues (19)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.