Class: Vx::ServiceConnector::GitlabV6::Session

Inherits:
Struct
  • Object
show all
Defined in:
lib/vx/service_connector/gitlab_v6/session.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint

Returns:

  • (Object)

    the current value of endpoint



7
8
9
# File 'lib/vx/service_connector/gitlab_v6/session.rb', line 7

def endpoint
  @endpoint
end

#private_tokenObject

Returns the value of attribute private_token

Returns:

  • (Object)

    the current value of private_token



7
8
9
# File 'lib/vx/service_connector/gitlab_v6/session.rb', line 7

def private_token
  @private_token
end

Instance Method Details

#delete(url, options = {}) ⇒ Object



23
24
25
26
27
28
# File 'lib/vx/service_connector/gitlab_v6/session.rb', line 23

def delete(url, options = {})
  wrap do
    res = agent.call :delete, request_url(url), nil, query: options
    response! res
  end
end

#get(url, options = {}) ⇒ Object



9
10
11
12
13
14
# File 'lib/vx/service_connector/gitlab_v6/session.rb', line 9

def get(url, options = {})
  wrap do
    res = agent.call :get, request_url(url), nil, query: options
    response! res
  end
end

#post(url, options = {}) ⇒ Object



16
17
18
19
20
21
# File 'lib/vx/service_connector/gitlab_v6/session.rb', line 16

def post(url, options = {})
  wrap do
    res = agent.call :post, request_url(url), options, nil
    response! res
  end
end

#uriObject



30
31
32
# File 'lib/vx/service_connector/gitlab_v6/session.rb', line 30

def uri
  @uri ||= URI(endpoint)
end