Hello Sunny

The email settings API doesn't work for gmail.com accounts. It is only
meant for Google Apps domain accounts.

Thanks
Gunjan Sharma | Developer Programs Engineer |  [email protected]
| +91 7702534446



On Wed, Dec 7, 2011 at 10:44 AM, Sunny Thakur <[email protected]> wrote:

> Hello Gunjan ,
>                      This is code snippet  ,I got some help from already
> developed sample application .
>
>  OAUTH.sendSignedRequest(
>       '
> https://apps-apis.google.com/a/feeds/emailsettings/2.0/default/sunny410083/signature
> ',
>       function(response) {
>       alert(response);
>
>         const RESULTS = JSON.parse(response).data.signature;
>
>         localStorage.digests = JSON.stringify(RESULTS.digests.slice(0,
> 20));
>         const UNREAD_COUNT = RESULTS.numResults;
>         PRETTYLOAD.finish(
>           localStorage.unreadCount ='+'
>
>         );
>       },
>       {
>         method: 'GET',
>         headers: {'Content-Type': 'application/json'},
>         body: JSON.stringify({
>           method: 'wave.robot.search',
>            params: {query: 'signature', numResults: MAX_UNREAD}
>         })
>       }
>     );
>   }
>   function authorize() {
>     OAUTH.authorize(function() {
>       BROWSER_ACTION.setIcon({path: 'authorized.png'});
>
>       BROWSER_ACTION.setBadgeBackgroundColor({color: [85, 144, 210, 255]});
>       sync();
>
>
>       id = setInterval(function() { sync(); }, 60000);
>     });
>   }
>
>   const UNKNOWN_COUNT = '?';
>
>   if (!parse(localStorage.initialized)) {
>     localStorage.maxDigests = 5;
>     localStorage.participantAnnotated = true;
>     initialize();
>     localStorage.initialized = true;
>   }
>
>   const BROWSER_ACTION = chrome.browserAction;
>   load();
>   BROWSER_ACTION.setBadgeText({text: UNKNOWN_COUNT});
>   const OAUTH = ChromeExOAuth.initBackgroundPage({
>     request_url: 'https://www.google.com/accounts/OAuthGetRequestToken',
>     authorize_url: 'https://www.google.com/accounts/OAuthAuthorizeToken',
>     access_url: 'https://www.google.com/accounts/OAuthGetAccessToken',
>
>    consumer_key: 'XYZ.apps.googleusercontent.com',
>     consumer_secret: 'abc',
>     scope: 'https://apps-apis.google.com/a/feeds/emailsettings/2.0/',
>     app_name: 'My SampleApp'
>   });
>   var id;
>   const PRETTYLOAD = new Prettyload(TRIANGLE_WAVE);
>   const MAX_UNREAD = 100;
>   authorize();
> </script>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Apps Domain Information and Management APIs" group.
> To post to this group, send email to
> [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/google-apps-mgmt-apis?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Apps Domain Information and Management APIs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-apps-mgmt-apis?hl=en.

Reply via email to