aliang / google_contacts_api Goto Github PK
View Code? Open in Web Editor NEWGoogle Contacts API for ruby, unofficial
License: Other
Google Contacts API for ruby, unofficial
License: Other
Return nil or empty result set if no next page. Raise error or return nil if no api object is given
Awesome gem, thanks a lot for your hard work.
I struggle to connect through oAuth, would you mind giving detailed step by step instructions on what to do to obtain the oauth_access_token_for_user?
Hi,
I am using GoogleOauth2 strategy in my application and upon authentication, the strategy is giving me OauthHash with access_token and refresh_token. I am not sure how to proceed with using that data to get contacts. the contacts API is asking for OAuth2::AccessToken object but i am getting Omniauth::AuthHash from strategy. Any idea how to get the same?
After a user oauth's with omniauth we save the oauth_token as a string. In this gem you require the access_token as an object. How do we go from one to the other?
I am trying to use this gem to authenticate my web application with the contacts API to create new contacts for a specific user. My assumption is that the underlying google account user who enables the contacts API on the console.developers.google.com portal can create service accounts that access its contact data. If this assumption is right, then using this gem should allow me to use application default credentials https://developers.google.com/identity/protocols/application-default-credentials to fetch that data using a service account instead of a Client-Server authentication workflow, which it seems that this gem primarily supports.
Any ideas on how I can use this gem to perform a server-to-server authentication workflow using application default credentials instead of a client-server one? Thanks in advance!
I can't seem to get the contacts in the starred group. Will your library do that?
Thanks @aliang
You could pass the Google Account you want to use and possibly password as environment variables, and it could run a test on Google's servers.
This is to protect against API changes on Google's end
We don't really need to see the gory details of the Api object, do we?
A lot of people have trouble getting the access token from Google's server
can we add a new contacts by using this gem?
hi, I'm loving your gem. Right now, calling contacts returns all of a user's contacts. Ideally, I'd like to get back "Most Contacted or Frequently Contacted" but after researching it appears that is not available via the APIs. The 2nd best idea is to return the contacts sorted by:
query.orderby = 'lastmodified'
Which apparently is the default setting listed here: https://developers.google.com/google-apps/contacts/v3/#retrieving_contacts_using_query_parameters
However, this gem doesn't seem to have any sort order, the ordering appears to be random.
With your gem is it possible to sort or return just the X last modified contacts? Or better yet, per the contact record include a "last_modified" timestamp?
Thank you again for all the work! It's really great and helpful
I am getting following error
uninitialized constant Api::TransactionController::GoogleContactsApi
when i try to initiliaze the constructor
google_contacts_user = GoogleContactsApi::User.new(oauth_access_token_for_user)
It's all OAuth 2.0 now
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.