circuit-api 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +7 -0
  2. data/lib/circuit.rb +39 -0
  3. metadata +113 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 0fc46bc3c38841c0780e3f421aba504d8d001663a2a00663672f9d982540e35c
4
+ data.tar.gz: caca5f3e579f3c8cbe1eb0a5c8619cad3b1cf970d38ce781df0d71fbabc1c743
5
+ SHA512:
6
+ metadata.gz: 146c763418c101491e68d46287fe35585522a76b4a99658ede912d232c63bb2fbec9d92202927382fe201f4ebf52ed451651982378a7b702b038e8421fee4abd
7
+ data.tar.gz: 50f2b3c6168840e5cd4ed2d6630cdaddc49174921ef35523b1e5a017e422f909fe32a6640626836a7f17874723a4c859870868717b2415c6d96348f295c83f21
@@ -0,0 +1,39 @@
1
+ require 'net/http'
2
+ require 'uri'
3
+ require 'json'
4
+
5
+ require 'circuit/version'
6
+
7
+ require 'circuit/utils/connection'
8
+ require 'circuit/utils/errors'
9
+ require 'circuit/utils/attributes'
10
+ require 'circuit/utils/object'
11
+
12
+ require 'circuit/resources/base'
13
+ require 'circuit/resources/conversation'
14
+ require 'circuit/resources/label'
15
+ require 'circuit/resources/message'
16
+ require 'circuit/resources/presence'
17
+ require 'circuit/resources/rtc_session'
18
+ require 'circuit/resources/user'
19
+ require 'circuit/resources/webhook'
20
+
21
+ module Circuit
22
+ API_BASE_URL = 'https://www.circuit.com/'.freeze
23
+ API_SANDBOX_BASE_URL = 'https://circuitsandbox.net/'.freeze
24
+ API_PATH_BASE = 'rest/v2/'.freeze
25
+
26
+ class << self
27
+ attr_accessor :api_client_id, :api_client_secret, :sandbox, :bearer_token, :logger
28
+
29
+ def base_url
30
+ return API_SANDBOX_BASE_URL if sandbox
31
+
32
+ API_BASE_URL
33
+ end
34
+
35
+ def api_url
36
+ URI.join(base_url, API_PATH_BASE)
37
+ end
38
+ end
39
+ end
metadata ADDED
@@ -0,0 +1,113 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: circuit-api
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Vincent Pochet
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2020-03-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.7'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.7'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rspec
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.1'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.10'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.10'
55
+ - !ruby/object:Gem::Dependency
56
+ name: webmock
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: sinatra
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: Wrapper of the Circuit Rest API
84
+ email: vincent@elqano.com
85
+ executables: []
86
+ extensions: []
87
+ extra_rdoc_files: []
88
+ files:
89
+ - lib/circuit.rb
90
+ homepage:
91
+ licenses:
92
+ - MIT
93
+ metadata: {}
94
+ post_install_message:
95
+ rdoc_options: []
96
+ require_paths:
97
+ - lib
98
+ required_ruby_version: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ required_rubygems_version: !ruby/object:Gem::Requirement
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ version: '0'
108
+ requirements: []
109
+ rubygems_version: 3.0.1
110
+ signing_key:
111
+ specification_version: 4
112
+ summary: Circuit Rest API client
113
+ test_files: []