Class: RakeCircleCI::URLs
- Inherits:
-
Object
- Object
- RakeCircleCI::URLs
- Defined in:
- lib/rake_circle_ci/client.rb
Instance Method Summary collapse
- #checkout_key_url(fingerprint) ⇒ Object
- #checkout_keys_url ⇒ Object
- #env_var_url(name) ⇒ Object
- #env_vars_url ⇒ Object
- #follow_url ⇒ Object
-
#initialize(opts) ⇒ URLs
constructor
A new instance of URLs.
- #settings_url ⇒ Object
- #ssh_keys_url ⇒ Object
Constructor Details
#initialize(opts) ⇒ URLs
Returns a new instance of URLs.
9 10 11 12 13 |
# File 'lib/rake_circle_ci/client.rb', line 9 def initialize(opts) @base_url = opts[:base_url] @api_token = opts[:api_token] @project_slug = opts[:project_slug] end |
Instance Method Details
#checkout_key_url(fingerprint) ⇒ Object
42 43 44 |
# File 'lib/rake_circle_ci/client.rb', line 42 def checkout_key_url(fingerprint) "#{@base_url}/v1.1/project/#{@project_slug}/checkout-key/#{fingerprint}" end |
#checkout_keys_url ⇒ Object
38 39 40 |
# File 'lib/rake_circle_ci/client.rb', line 38 def checkout_keys_url "#{@base_url}/v1.1/project/#{@project_slug}/checkout-key" end |
#env_var_url(name) ⇒ Object
24 25 26 |
# File 'lib/rake_circle_ci/client.rb', line 24 def env_var_url(name) "#{@base_url}/v2/project/#{@project_slug}/envvar/#{name}" end |
#env_vars_url ⇒ Object
20 21 22 |
# File 'lib/rake_circle_ci/client.rb', line 20 def env_vars_url "#{@base_url}/v2/project/#{@project_slug}/envvar" end |
#follow_url ⇒ Object
15 16 17 18 |
# File 'lib/rake_circle_ci/client.rb', line 15 def follow_url "#{@base_url}/v1.1/project/#{@project_slug}/follow?" \ "circle-token=#{@api_token}" end |
#settings_url ⇒ Object
28 29 30 31 |
# File 'lib/rake_circle_ci/client.rb', line 28 def settings_url "#{@base_url}/v1.1/project/#{@project_slug}/settings?" \ "circle-token=#{@api_token}" end |
#ssh_keys_url ⇒ Object
33 34 35 36 |
# File 'lib/rake_circle_ci/client.rb', line 33 def ssh_keys_url "#{@base_url}/v1.1/project/#{@project_slug}/ssh-key?" \ "circle-token=#{@api_token}" end |