Skip to content

Instantly share code, notes, and snippets.

@vvakame
Created June 1, 2014 04:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vvakame/d1568eacffd21db93daf to your computer and use it in GitHub Desktop.
Save vvakame/d1568eacffd21db93daf to your computer and use it in GitHub Desktop.
こぉいぅのがでるょぅになったょワラ
declare module gapi.client {
module mirror {
var accounts: {
insert: (params: {
accountName: string;
accountType: string;
userToken: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // IAccount
};
var contacts: {
delete: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // void
get: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // IContact
insert: () => { execute(callback: (data:any, original: string) => void):void; }; // IContact
list: () => { execute(callback: (data:any, original: string) => void):void; }; // IContactsListResponse
patch: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // IContact
update: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // IContact
};
var locations: {
get: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // ILocation
list: () => { execute(callback: (data:any, original: string) => void):void; }; // ILocationsListResponse
};
var settings: {
get: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // ISetting
};
var subscriptions: {
delete: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // void
insert: () => { execute(callback: (data:any, original: string) => void):void; }; // ISubscription
list: () => { execute(callback: (data:any, original: string) => void):void; }; // ISubscriptionsListResponse
update: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // ISubscription
};
var timeline: {
delete: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // void
get: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // ITimelineItem
insert: () => { execute(callback: (data:any, original: string) => void):void; }; // ITimelineItem
list: (params: {
bundleId?: string;
includeDeleted?: boolean;
maxResults?: number;
orderBy?: string;
pageToken?: string;
pinnedOnly?: boolean;
sourceItemId?: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // ITimelineListResponse
patch: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // ITimelineItem
update: (params: {
id: string;
}) => { execute(callback: (data:any, original: string) => void):void; }; // ITimelineItem
};
interface IAccount {
authTokens: IAuthToken[];
features: string[];
password: string;
userData: IUserData[];
}
interface IAttachment {
contentType: string;
contentUrl: string;
id: string;
isProcessingContent: boolean;
}
interface IAttachmentsListResponse {
items: IAttachment[];
kind: string;
}
interface IAuthToken {
authToken: string;
type: string;
}
interface ICommand {
type: string;
}
interface IContact {
acceptCommands: ICommand[];
acceptTypes: string[];
displayName: string;
id: string;
imageUrls: string[];
kind: string;
phoneNumber: string;
priority: number; // uint32
sharingFeatures: string[];
source: string;
speakableName: string;
type: string;
}
interface IContactsListResponse {
items: IContact[];
kind: string;
}
interface ILocation {
accuracy: number; // double
address: string;
displayName: string;
id: string;
kind: string;
latitude: number; // double
longitude: number; // double
timestamp: string; // date-time
}
interface ILocationsListResponse {
items: ILocation[];
kind: string;
}
interface IMenuItem {
action: string;
id: string;
payload: string;
removeWhenSelected: boolean;
values: IMenuValue[];
}
interface IMenuValue {
displayName: string;
iconUrl: string;
state: string;
}
interface INotification {
collection: string;
itemId: string;
operation: string;
userActions: IUserAction[];
userToken: string;
verifyToken: string;
}
interface INotificationConfig {
deliveryTime: string; // date-time
level: string;
}
interface ISetting {
id: string;
kind: string;
value: string;
}
interface ISubscription {
callbackUrl: string;
collection: string;
id: string;
kind: string;
notification: INotification;
operation: string[];
updated: string; // date-time
userToken: string;
verifyToken: string;
}
interface ISubscriptionsListResponse {
items: ISubscription[];
kind: string;
}
interface ITimelineItem {
attachments: IAttachment[];
bundleId: string;
canonicalUrl: string;
created: string; // date-time
creator: IContact;
displayTime: string; // date-time
etag: string;
html: string;
id: string;
inReplyTo: string;
isBundleCover: boolean;
isDeleted: boolean;
isPinned: boolean;
kind: string;
location: ILocation;
menuItems: IMenuItem[];
notification: INotificationConfig;
pinScore: number; // int32
recipients: IContact[];
selfLink: string;
sourceItemId: string;
speakableText: string;
speakableType: string;
text: string;
title: string;
updated: string; // date-time
}
interface ITimelineListResponse {
items: ITimelineItem[];
kind: string;
nextPageToken: string;
}
interface IUserAction {
payload: string;
type: string;
}
interface IUserData {
key: string;
value: string;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment