|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this_program `()(string client_id, string client_secret, |
void|string redirect_uri, |
void|string|array(string)|multiset(string) scope) |
{ |
return V1(client_id, client_secret, redirect_uri, scope); |
} |
|
class V1 |
{ |
inherit WebApi.Google.Api; |
|
|
protected constant API_URI = "https://www.googleapis.com/plus/v1"; |
|
protected constant AuthClass = Auth.Google.Plus; |
|
|
|
|
|
|
|
People `people() |
{ |
return _people || (_people = People()); |
} |
|
|
|
|
|
|
Activities `activities() |
{ |
return _activities || (_activities = Activities()); |
} |
|
|
|
|
|
|
class People |
{ |
inherit Method; |
protected constant METHOD_PATH = "/people/"; |
|
|
|
|
|
|
|
mapping get(void|string user_id, void|Callback cb) |
{ |
return _get(user_id||"me", 0, cb); |
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
mapping list(void|string user_id, void|string collection, |
void|ParamsArg params, void|Callback cb) |
{ |
return _get((user_id||"me") + "/activities/" + (collection||"public"), |
params, cb); |
} |
} |
|
|
|
|
|
|
class Activities |
{ |
inherit Method; |
protected constant METHOD_PATH = "/activities/"; |
|
mapping activity(string activity_id, void|Callback cb) |
{ |
return _get(activity_id, 0, cb); |
} |
} |
|
|
|
private People _people; |
private Activities _activities; |
} |
|
|