No commit activity in last 3 years
No release in over 3 years
API consuming models for the GoogleSyncinator project
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
 Dependencies

Development

~> 1.3
~> 0.9
~> 2.14
~> 1.17

Runtime

~> 1.0
~> 1.0
 Project Readme

GoogleSyncinator API Client Build Status

Google Syncinator API Client is a client to the google-syncinator API (duh!)

Installing

Add gem 'google_syncinator_api_client' to your Gemfile and run bundle

Configuration

GoogleSyncinatorAPIClient.configure do |config|
  # Optional:
  # config.scheme = 'http'
  # config.host = 'localhost'
  # config.script_name = nil
  # config.version = 'v1'

  # Required:
  config.access_id = '**************'
  config.secret_key = '*****************************************'
end

Getting Credentials

To create a google-syncinator client and get an access_id and secret_key, see the google-syncinator README.

Usage

Example Syncinator

require 'google_syncinator_api_client'
require 'multi_json'

emails_api = GoogleSyncinator::APIClient::Emails.new
emails = emails_api.index.perform.parse
emails_api.show(id: emails.first['id']).perform.parse

person_emails_api = GoogleSyncinator::APIClient::PersonEmails.new
person_email = person_emails_api.create(uuid: 'TROGDIR_PERSON_UUID', address: 'test@example.com').perform.parse
person_emails_api.show(id: person_email['id']).perform

alias_emails_api = GoogleSyncinator::APIClient::AliasEmails.new
alias_email = alias_emails_api.create(account_email_id: person_email['id'], address: 'test@example.com').perform.parse
alias_emails_api.show(id: alias_email['id']).perform

deprovision_schedules_api = GoogleSyncinator::APIClient::DeprovisionSchedules.new
deprovision_schedule = deprovision_schedules_api.create(email_id: person_email['id'], action: :suspend, scheduled_for: Time.now).perform.parse
deprovision_schedules_api.update(email_id: person_email['id'], id: deprovision_schedule['id'], canceled: true).perform
deprovision_schedules_api.destroy(email_id: person_email['id'], id: deprovision_schedule['id']).perform

exclusions_api = GoogleSyncinator::APIClient::Exclusions.new
exclusion_api = exclusions_api.create(email_id: person_email['id'], creator_uuid: 'TROGDIR_PERSON_UUID', starts_at: Time.now).perform.parse
exclusions_api.destroy(email_id: person_email['id'], id: exclusion_api['id']).perform

License

MIT