relinkly 1.0.1 → 1.0.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: 62e19675647abf66a3224c35a5f6bd8f9f091e8364d09bfd31f7302a1a097652
4
- data.tar.gz: 81604d5824117d10be52b756df585e08187e5613f7d788f9490f201a5bd76a39
3
+ metadata.gz: ca3d464fc600ace0e0982fbb9a910796a4688b27737f86a443381360b177d092
4
+ data.tar.gz: 7c52ecef421d2b51b0a447e5f69013cc5745b1b29be395542c8945e7ae0cf390
5
5
  SHA512:
6
- metadata.gz: 881108d64d8453895389e51fc4dd2e7892ec3913659e47c88138d0d5f5c36a445557060611e371bc44b69d54ee1bc9875e880f23d5929dc292683be3d2df7520
7
- data.tar.gz: 56330896dd5aa3b5de153c74fdc8e382ccd9ab8b505094ae0f48a886752f891a46c7af711f8c7fb2a68c5a160af2fcb9168e0b570b3e21cc4f9489c078e8a78d
6
+ metadata.gz: 63e74e9104608ac8d717b5edc14e72878c54abb616a5269fc6b619e907ff469b663c8e0613bc4aaf24e0f62f244cb79a7d0d06483e1fde0c41209e5ba85a0551
7
+ data.tar.gz: e82e824a00937180539f49e007257a07cd321126f48b3c0ea1f64261d16f5cd43156a41b8e761ef13ab70d101c1335b9c0094bbd33ab2d87370f726182b77826
data/.gitignore CHANGED
@@ -9,3 +9,4 @@
9
9
  /spec/reports/
10
10
  /tmp/
11
11
  *.gem
12
+ .idea/
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # relinkly
1
+ # relinkly [![Gem Version](https://badge.fury.io/rb/relinkly.svg)](https://badge.fury.io/rb/relinkly) [![Build Status](https://travis-ci.com/cyborgINX/relinkly.svg?branch=master)](https://travis-ci.com/cyborgINX/relinkly)
2
2
 
3
3
  ## Installation
4
4
 
@@ -57,7 +57,7 @@ api.delete_tag(id, options) # DELETE /v1/tags/:id
57
57
  #### Links
58
58
  ```ruby
59
59
  api.links # GET /v1/links
60
- api.links(id) # GET /v1/links/:id
60
+ api.link(id) # GET /v1/links/:id
61
61
  api.link_count(options) # GET /v1/links/count
62
62
  api.new_link(options) # GET /v1/links/new
63
63
  api.shorten(destination, options) # POST /v1/links
@@ -66,7 +66,7 @@ api.delete_link(id, options) # DELETE /v1/links/:id
66
66
  api.tags_link(id, options) # GET /v1/links/:id/tags
67
67
  ```
68
68
 
69
- #### Make a new branded short link
69
+ #### Creating your branded short link!
70
70
 
71
71
  ```ruby
72
72
  my_domain = api.domains.first
@@ -74,8 +74,9 @@ link = api.shorten('https://google.com', domain: my_domain.to_h, title: 'Google'
74
74
  ```
75
75
 
76
76
  #### Workspace workaround
77
- Please see the applicable methods for options available when making requests. In case of new link creation, default workspace is selected if workspace isn't mentioned explictly.
78
- Please pass the workspace_id in the options as follows in case you want to create branded link to another workspace.
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 perform operations other than the default workspace.
78
+
79
+ Here's how you can create a link into another workspace.
79
80
 
80
81
  ```ruby
81
82
  my_domain = api.domains.first
@@ -83,7 +84,9 @@ my_workspace_id = api.workspaces.first.id
83
84
  link = api.shorten('https://google.com', domain: my_domain.to_h, title: 'Google', description: 'Google Homepage', workspace: my_workspace_id)
84
85
  ```
85
86
 
86
- Please note that `my_domain` should already be included inside `my_workspace`. You can find all the details about your workspace by going here. https://app.rebrandly.com/workspaces
87
+ Please note that `my_domain` should already be included inside `my_workspace`. Similarly other operations on link and tags can be achieved as above.
88
+
89
+ You can find all the details about your workspace by going here. https://app.rebrandly.com/workspaces
87
90
 
88
91
 
89
92
  ## Contributing
data/lib/relinkly/api.rb CHANGED
@@ -132,6 +132,8 @@ module Relinkly
132
132
  http_attrs.merge!(query: options)
133
133
  when :post
134
134
  http_attrs.merge!(body: options.to_json)
135
+ else
136
+ # type code here
135
137
  end
136
138
 
137
139
  res = HTTParty.send(method, url, http_attrs)
data/lib/relinkly/link.rb CHANGED
@@ -5,8 +5,7 @@ module Relinkly
5
5
  attr_accessor :id, :link_id, :title, :slashtag, :destination, :created_at,
6
6
  :updated_at, :status, :tags, :scripts, :forward_parameters,
7
7
  :clicks, :last_click_date, :last_click_at, :is_public,
8
- :short_url, :domain_id, :domain_name,
9
- :https, :favourite
8
+ :short_url, :domain_id, :domain_name, :https, :favourite
10
9
 
11
10
  # Associations
12
11
  %i[domain creator integration].each do |association|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Relinkly
4
- VERSION = '1.0.1'
4
+ VERSION = '1.0.2'
5
5
  end
@@ -2,7 +2,6 @@
2
2
 
3
3
  module Relinkly
4
4
  class Workspace < Element
5
- attr_accessor :id, :name, :avatarUrl, :links, :teammates,
6
- :domains, :created_at, :updated_at
5
+ attr_accessor :id, :name, :avatarUrl, :links, :teammates, :domains, :created_at, :updated_at
7
6
  end
8
7
  end
data/relinkly.gemspec CHANGED
@@ -7,10 +7,10 @@ Gem::Specification.new do |spec|
7
7
  spec.name = "relinkly"
8
8
  spec.version = Relinkly::VERSION
9
9
  spec.authors = ["Rajan Bhattarai"]
10
- spec.email = ["hey@rajanbhattarai.com"]
10
+ spec.email = ["rajan@rajanbhattarai.com"]
11
11
 
12
- spec.summary = "A Ruby wrapper for the Rebrandly API "
13
- spec.description = "Easily create short links on your ruby apps using Rebrandly API."
12
+ spec.summary = "A Ruby wrapper for the Your Favorite Link Shortner API "
13
+ spec.description = "Easily create short links on your ruby apps using your favorite link shortner app's API."
14
14
  spec.homepage = "https://github.com/cdrrazan/relinkly"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: relinkly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rajan Bhattarai
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-01-01 00:00:00.000000000 Z
11
+ date: 2025-01-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -66,9 +66,10 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: 0.18.1
69
- description: Easily create short links on your ruby apps using Rebrandly API.
69
+ description: Easily create short links on your ruby apps using your favorite link
70
+ shortner app's API.
70
71
  email:
71
- - hey@rajanbhattarai.com
72
+ - rajan@rajanbhattarai.com
72
73
  executables: []
73
74
  extensions: []
74
75
  extra_rdoc_files: []
@@ -98,7 +99,7 @@ homepage: https://github.com/cdrrazan/relinkly
98
99
  licenses:
99
100
  - MIT
100
101
  metadata: {}
101
- post_install_message:
102
+ post_install_message:
102
103
  rdoc_options: []
103
104
  require_paths:
104
105
  - lib
@@ -113,8 +114,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
114
  - !ruby/object:Gem::Version
114
115
  version: '0'
115
116
  requirements: []
116
- rubygems_version: 3.1.4
117
- signing_key:
117
+ rubygems_version: 3.4.17
118
+ signing_key:
118
119
  specification_version: 4
119
- summary: A Ruby wrapper for the Rebrandly API
120
+ summary: A Ruby wrapper for the Your Favorite Link Shortner API
120
121
  test_files: []