pike.git / lib / modules / Web.pmod / Api.pmod / Github.pmod

version» Context lines:

pike.git/lib/modules/Web.pmod/Api.pmod/Github.pmod:1: - /* -  Author: Pontus Östlund <https://profiles.google.com/poppanator> -  -  Permission to copy, modify, and distribute this source for any legal -  purpose granted as long as my name is still attached to it. More -  specifically, the GPL, LGPL and MPL licenses apply to this software. - */ -  +    //! Instantiates the default Github API. - //! See @[WebApi.Api()] for further information about the arguments + //! See @[Web.Api.Api()] for further information.   //!   //! @param client_id   //! Your application key/id   //! @param client_secret   //! Your application secret   //! @param redirect_uri   //! The redirect URI after an authentication   //! @param scope   //! The application scopes to grant access to   this_program `()(string client_id, string client_secret,    void|string redirect_uri,    void|string|array(string)|multiset(string) scope)   {    return Github(client_id, client_secret, redirect_uri, scope);   }      class Github   { -  inherit WebApi.Api : parent; +  inherit Web.Api.Api : parent;    -  protected constant AuthClass = Auth.Github; +  protected constant AuthClass = Web.Auth.Github;       //! The base uri to the Github API    constant API_URI = "https://api.github.com";       //! Getter for the @[Any] object which is a generic object for making request    //! to the Github API    //!    //! @seealso    //! @[Any]    Any `any()
pike.git/lib/modules/Web.pmod/Api.pmod/Github.pmod:97:    //! @param cb    //! Callback for async requests    mapping delete(string path, void|ParamsArg params, void|Callback cb)    {    return `any()->delete(path, params, cb);    }       // Just a convenience class    protected class Method    { -  inherit WebApi.Api.Method; +  inherit Web.Api.Api.Method;       //! Internal convenience method    public mixed get(string s, void|ParamsArg p, void|Callback cb)    {    return parent::get(get_uri(METHOD_PATH + s), p, cb);    }       //! Internal convenience method    public mixed put(string s, void|ParamsArg p, void|Callback cb)    {