relinkly 1.1.1 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: afd77fb83655421ffccdcc5930da3f15133eeaf47f0205a8ef103bd50fe94efb
4
- data.tar.gz: 6b60e768e3699c93f0d84d33f64b5edee55ef8a6a02c12afcd2ece12ab1a0328
3
+ metadata.gz: 2c6fcec1a1d8311e2f5f99ff3f8ab76a71bdc5863dec985af3e25b3802836534
4
+ data.tar.gz: 7bb1696a327df2efab317851c6dfe2d44a3588a58ee2ef947666d26e4f436ec8
5
5
  SHA512:
6
- metadata.gz: 167554f6e43ab5eeeaefd3870322f168b2a28fbcfdf5817ae658b5cb849b031c3b86314e8a6f9a1908bbefd90f56d3c1ab0ac9fc09bbc9f00c487c1b55f603a5
7
- data.tar.gz: 26c87be5be87cf0ce5c1cd896e795cef98b563c3b6d0e3a676f4c6c2b9cd40fd5f496937c7a0916dd20ac5d130f2bb1bc1a09476498408bd90dbb86f7a6db815
6
+ metadata.gz: d774e79c0b23b98cb071e3b8a6d01ab52823e1fa0384e4089999487bc4357a532a1cc12cbaac6756a7dc1e25728384f75080a02d8c9544036e7bcfd7f76ab189
7
+ data.tar.gz: 2faf8b36c8d5108fd9544a88f304f8e6e201ab92af3eabe091fcad5287a351fb3b3a2e8b40544f37faf9034047ea13345fa24315cfd3201dcce8def80cc3f08c
data/lib/relinkly/api.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'httparty'
4
+ require 'json'
4
5
 
5
6
  module Relinkly
6
7
  class RelinklyError < StandardError; end
@@ -29,7 +30,7 @@ module Relinkly
29
30
  ########################################
30
31
 
31
32
  # GET /v1/account/workspaces
32
- def workspaces(options: {})
33
+ def workspaces(options = {})
33
34
  all_workspaces = relinkly_request(:get, 'workspaces', options)
34
35
  all_workspaces.map { |workspace| Workspace.new(workspace) }
35
36
  end
@@ -43,7 +44,7 @@ module Relinkly
43
44
  ########################################
44
45
 
45
46
  # GET /v1/domains
46
- def domains(options: {})
47
+ def domains(options = {})
47
48
  all_domains = relinkly_request(:get, 'domains', options)
48
49
  all_domains.map { |domain| Domain.new(domain) }
49
50
  end
@@ -54,7 +55,7 @@ module Relinkly
54
55
  end
55
56
 
56
57
  # GET /v1/domains/count
57
- def domain_count(_options: {})
58
+ def domain_count(_options = {})
58
59
  relinkly_request(:get, 'domains/count')['count']
59
60
  end
60
61
 
@@ -63,7 +64,7 @@ module Relinkly
63
64
  ########################################
64
65
 
65
66
  # GET /v1/tags
66
- def tags(options: {})
67
+ def tags(options = {})
67
68
  all_tags = relinkly_request(:get, 'tags', options)
68
69
  all_tags.map { |tag| Tag.new(tag) }
69
70
  end
@@ -74,23 +75,23 @@ module Relinkly
74
75
  end
75
76
 
76
77
  # GET /v1/tags/count
77
- def tag_count(_options: {})
78
+ def tag_count(_options = {})
78
79
  relinkly_request(:get, 'tags/count')['count']
79
80
  end
80
81
 
81
82
  # POST /v1/tags
82
- def new_tag(destination, options: {})
83
+ def new_tag(destination, options = {})
83
84
  options[:destination] = destination
84
85
  Tag.new(relinkly_request(:post, 'tags', options))
85
86
  end
86
87
 
87
88
  # POST /v1/tags/:id
88
- def update_tag(id, options: {})
89
+ def update_tag(id, options = {})
89
90
  Tag.new(relinkly_request(:post, "tags/#{id}", options))
90
91
  end
91
92
 
92
93
  # DELETE /v1/tags/:id
93
- def delete_tag(id, options: {})
94
+ def delete_tag(id, options = {})
94
95
  Tag.new(relinkly_request(:delete, "tags/#{id}", options))
95
96
  end
96
97
 
@@ -99,7 +100,7 @@ module Relinkly
99
100
  ########################################
100
101
 
101
102
  # GET /v1/links
102
- def links(options: {})
103
+ def links(options = {})
103
104
  all_links = relinkly_request(:get, 'links', options)
104
105
  all_links.map { |link| Link.new(link) }
105
106
  end
@@ -115,7 +116,7 @@ module Relinkly
115
116
  end
116
117
 
117
118
  # POST /v1/links
118
- def shorten(destination, options: {})
119
+ def shorten(destination, options = {})
119
120
  options[:destination] = destination
120
121
  Link.new(relinkly_request(:post, 'links', options))
121
122
  end
@@ -131,7 +132,7 @@ module Relinkly
131
132
  end
132
133
 
133
134
  # DELETE /v1/links
134
- def delete_links(options: {})
135
+ def delete_links(options = {})
135
136
  Link.new(relinkly_request(:delete, 'links', options))
136
137
  end
137
138
 
@@ -141,27 +142,27 @@ module Relinkly
141
142
  end
142
143
 
143
144
  # POST /v1/links/:id/tags/:tag
144
- def add_tags_link(id, tag, options: {})
145
+ def add_tags_link(id, tag, options = {})
145
146
  Link.new(relinkly_request(:post, "/links/#{id}/tags/#{tag}", options))
146
147
  end
147
148
 
148
149
  # DELETE /v1/links/:id/tags/:tag
149
- def delete_tags_link(id, tag, options: {})
150
+ def delete_tags_link(id, tag, options = {})
150
151
  Link.new(relinkly_request(:delete, "/links/#{id}/tags/#{tag}", options))
151
152
  end
152
153
 
153
154
  # GET /v1/links/:id/scripts
154
- def scripts_link(id, options: {})
155
+ def scripts_link(id, options = {})
155
156
  Link.new(relinkly_request(:get, "/links/#{id}/scripts", options))
156
157
  end
157
158
 
158
159
  # POST /v1/links/:id/scripts/:script
159
- def add_scripts_link(id, script, options: {})
160
+ def add_scripts_link(id, script, options = {})
160
161
  Link.new(relinkly_request(:post, "/links/#{id}/scripts/#{script}", options))
161
162
  end
162
163
 
163
164
  # DELETE /v1/links/:id/scripts/:script
164
- def delete_scripts_link(id, script, options: {})
165
+ def delete_scripts_link(id, script, options = {})
165
166
  Link.new(relinkly_request(:delete, "/links/#{id}/scripts/#{script}", options))
166
167
  end
167
168
 
@@ -170,7 +171,7 @@ module Relinkly
170
171
  ########################################
171
172
 
172
173
  # GET /v1/scripts
173
- def scripts(options: {})
174
+ def scripts(options = {})
174
175
  all_scripts = relinkly_request(:get, 'scripts', options)
175
176
  all_scripts.map { |script| Script.new(script) }
176
177
  end
@@ -181,7 +182,7 @@ module Relinkly
181
182
  end
182
183
 
183
184
  # GET /v1/scripts/count
184
- def script_count(_options: {})
185
+ def script_count(_options = {})
185
186
  relinkly_request(:get, 'scripts/count')['count']
186
187
  end
187
188
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Relinkly
4
- VERSION = '1.1.1'
4
+ VERSION = '1.1.2'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relinkly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajan Bhattarai