relinkly 1.1.0 → 1.1.1
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 +4 -4
- data/README.md +36 -21
- data/lib/relinkly/version.rb +1 -1
- data/relinkly.gemspec +4 -4
- metadata +9 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: afd77fb83655421ffccdcc5930da3f15133eeaf47f0205a8ef103bd50fe94efb
|
|
4
|
+
data.tar.gz: 6b60e768e3699c93f0d84d33f64b5edee55ef8a6a02c12afcd2ece12ab1a0328
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 167554f6e43ab5eeeaefd3870322f168b2a28fbcfdf5817ae658b5cb849b031c3b86314e8a6f9a1908bbefd90f56d3c1ab0ac9fc09bbc9f00c487c1b55f603a5
|
|
7
|
+
data.tar.gz: 26c87be5be87cf0ce5c1cd896e795cef98b563c3b6d0e3a676f4c6c2b9cd40fd5f496937c7a0916dd20ac5d130f2bb1bc1a09476498408bd90dbb86f7a6db815
|
data/README.md
CHANGED
|
@@ -35,23 +35,14 @@ api = Relinkly::API.new
|
|
|
35
35
|
|
|
36
36
|
### API Requests
|
|
37
37
|
|
|
38
|
-
#### Account
|
|
38
|
+
#### Account, Workspaces & Domains
|
|
39
|
+
|
|
39
40
|
```ruby
|
|
41
|
+
api.account # GET /v1/account
|
|
42
|
+
api.workspaces # GET /v1/workspaces
|
|
40
43
|
api.domains # GET /v1/domains
|
|
41
44
|
api.domain(id) # GET /v1/domains/:id
|
|
42
45
|
api.domain_count(options) # GET /v1/domains/count
|
|
43
|
-
api.account # GET /v1/account
|
|
44
|
-
api.workspaces # GET /v1/account/workspaces
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
#### Tags
|
|
48
|
-
```ruby
|
|
49
|
-
api.tags # GET /v1/tags
|
|
50
|
-
api.tag(id) # GET /v1/tags/:id
|
|
51
|
-
api.tag_count(options) # GET /v1/tags/count
|
|
52
|
-
api.new_tag(options) # GET /v1/tags/new
|
|
53
|
-
api.update_tag(id, options) # POST /v1/tags/:id
|
|
54
|
-
api.delete_tag(id, options) # DELETE /v1/tags/:id
|
|
55
46
|
```
|
|
56
47
|
|
|
57
48
|
#### Links
|
|
@@ -62,29 +53,53 @@ api.link_count(options) # GET /v1/links/count
|
|
|
62
53
|
api.new_link(options) # GET /v1/links/new
|
|
63
54
|
api.shorten(destination, options) # POST /v1/links
|
|
64
55
|
api.update_link(id, options) # POST /v1/links/:id
|
|
56
|
+
api.delete_links(ids, options) # DELETE /v1/links
|
|
65
57
|
api.delete_link(id, options) # DELETE /v1/links/:id
|
|
66
58
|
api.tags_link(id, options) # GET /v1/links/:id/tags
|
|
59
|
+
api.add_tag_link(id, options) # POST /v1/links/:id/tags
|
|
60
|
+
api.delete_tag_link(id, options) # DELETE /v1/links/:id/tags
|
|
61
|
+
api.scripts_link(id, options) # GET /v1/links/:id/scripts
|
|
62
|
+
api.add_script_link(id, options) # POST /v1/links/:id/scripts
|
|
63
|
+
api.delete_script_link(id, options) # DELETE /v1/links/:id/scripts
|
|
67
64
|
```
|
|
68
65
|
|
|
66
|
+
#### Tags
|
|
67
|
+
```ruby
|
|
68
|
+
api.tags # GET /v1/tags
|
|
69
|
+
api.tag(id) # GET /v1/tags/:id
|
|
70
|
+
api.tag_count(options) # GET /v1/tags/count
|
|
71
|
+
api.new_tag(options) # POST /v1/tags
|
|
72
|
+
api.update_tag(id, options) # POST /v1/tags/:id
|
|
73
|
+
api.delete_tag(id, options) # DELETE /v1/tags/:id
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
#### Scripts
|
|
77
|
+
```ruby
|
|
78
|
+
api.scripts # GET /v1/scripts
|
|
79
|
+
api.script(id) # GET /v1/scripts/:id
|
|
80
|
+
api.script_count(options) # GET /v1/scripts/count
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
|
|
69
84
|
#### Creating your branded short link!
|
|
70
85
|
|
|
71
86
|
```ruby
|
|
72
|
-
|
|
73
|
-
|
|
87
|
+
your_domain = api.domains.first
|
|
88
|
+
branded_link = api.shorten('https://google.com', domain: your_domain.to_h, title: 'Google', description: 'Google Homepage')
|
|
74
89
|
```
|
|
75
90
|
|
|
76
91
|
#### Workspace workaround
|
|
77
|
-
Please see the applicable methods for options available when making requests. You need to pass the workspace_id in the options as follows in case you want to
|
|
92
|
+
Please see the applicable methods for options available when making requests. You need to pass the workspace_id in the options as follows in case you want to select other than the default workspace.
|
|
78
93
|
|
|
79
|
-
Here's how you can
|
|
94
|
+
Here's how you can achieve that:
|
|
80
95
|
|
|
81
96
|
```ruby
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
97
|
+
your_domain = api.domains.first
|
|
98
|
+
your_workspace_id = api.workspaces.first.id
|
|
99
|
+
branded_link = api.shorten('https://google.com', domain: your_domain.to_h, title: 'Google', description: 'Google Homepage', workspace: your_workspace_id)
|
|
85
100
|
```
|
|
86
101
|
|
|
87
|
-
Please note that `
|
|
102
|
+
Please note that `your_domain` should already be included inside `your_workspace`.
|
|
88
103
|
|
|
89
104
|
You can find all the details about your workspace by going here. https://app.rebrandly.com/workspaces
|
|
90
105
|
|
data/lib/relinkly/version.rb
CHANGED
data/relinkly.gemspec
CHANGED
|
@@ -21,8 +21,8 @@ Gem::Specification.new do |spec|
|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
22
22
|
spec.require_paths = ["lib"]
|
|
23
23
|
|
|
24
|
-
spec.add_development_dependency "bundler", "~> 2.2
|
|
25
|
-
spec.add_development_dependency "rake", "~> 13.
|
|
26
|
-
spec.add_development_dependency "rspec", "~> 3.
|
|
27
|
-
spec.add_dependency 'httparty', '~> 0.
|
|
24
|
+
spec.add_development_dependency "bundler", "~> 2.6.2"
|
|
25
|
+
spec.add_development_dependency "rake", "~> 13.2.1"
|
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.13.0"
|
|
27
|
+
spec.add_dependency 'httparty', '~> 0.22.0'
|
|
28
28
|
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.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Rajan Bhattarai
|
|
@@ -16,56 +16,56 @@ dependencies:
|
|
|
16
16
|
requirements:
|
|
17
17
|
- - "~>"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 2.2
|
|
19
|
+
version: 2.6.2
|
|
20
20
|
type: :development
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
24
|
- - "~>"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
|
-
version: 2.2
|
|
26
|
+
version: 2.6.2
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
28
28
|
name: rake
|
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
|
30
30
|
requirements:
|
|
31
31
|
- - "~>"
|
|
32
32
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: 13.
|
|
33
|
+
version: 13.2.1
|
|
34
34
|
type: :development
|
|
35
35
|
prerelease: false
|
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
37
|
requirements:
|
|
38
38
|
- - "~>"
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: 13.
|
|
40
|
+
version: 13.2.1
|
|
41
41
|
- !ruby/object:Gem::Dependency
|
|
42
42
|
name: rspec
|
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 3.
|
|
47
|
+
version: 3.13.0
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 3.
|
|
54
|
+
version: 3.13.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: httparty
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
58
58
|
requirements:
|
|
59
59
|
- - "~>"
|
|
60
60
|
- !ruby/object:Gem::Version
|
|
61
|
-
version: 0.
|
|
61
|
+
version: 0.22.0
|
|
62
62
|
type: :runtime
|
|
63
63
|
prerelease: false
|
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
|
65
65
|
requirements:
|
|
66
66
|
- - "~>"
|
|
67
67
|
- !ruby/object:Gem::Version
|
|
68
|
-
version: 0.
|
|
68
|
+
version: 0.22.0
|
|
69
69
|
description: Easily create short links on your ruby apps using Rebrandly API.
|
|
70
70
|
email:
|
|
71
71
|
- rajan@rajanbhattarai.com
|