Method: FtgSync#initialize

Defined in:
lib/ftg/ftg_sync.rb

#initializeFtgSync

Returns a new instance of FtgSync.



16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# File 'lib/ftg/ftg_sync.rb', line 16

def initialize
  require 'uri'
  require 'httparty'

  @headers = {
    'Content-Type' => 'application/json'
  }
  @credentials = {
    username: TOGGL_API_TOKEN,
    password: 'api_token'
  }
  @base_query = {
    user_agent: 'ftg',
    workspace_id: WORKSPACE_ID
  }

  @base_params = {
    headers: @headers,
    query: @base_query,
    basic_auth: @credentials
  }

  @base_params_jira = {
    headers: @headers,
    basic_auth: {
      username: 'benjamin.crouzier',
      password: 'morebabyplease'
    }
  }
end