supportify_client 0.0.4 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (36) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +6 -4
  3. data/Gemfile.lock +47 -39
  4. data/Rakefile +4 -4
  5. data/VERSION +1 -1
  6. data/lib/supportify_client/api/supportify_api.rb +560 -0
  7. data/lib/supportify_client/api_client.rb +271 -0
  8. data/lib/supportify_client/api_error.rb +24 -0
  9. data/lib/supportify_client/configuration.rb +187 -0
  10. data/lib/supportify_client/models/base_object.rb +87 -0
  11. data/lib/supportify_client/models/category.rb +53 -0
  12. data/lib/supportify_client/models/error.rb +53 -0
  13. data/lib/supportify_client/models/faq.rb +161 -0
  14. data/lib/supportify_client/models/info.rb +45 -0
  15. data/lib/supportify_client/models/tag.rb +53 -0
  16. data/lib/supportify_client/models/user.rb +45 -0
  17. data/lib/supportify_client.rb +30 -14
  18. data/spec/features/.gitkeep +0 -0
  19. data/supportify_client.gemspec +27 -27
  20. metadata +38 -26
  21. data/lib/supportify_client/api/category.rb +0 -17
  22. data/lib/supportify_client/api/error.rb +0 -13
  23. data/lib/supportify_client/api/faq.rb +0 -23
  24. data/lib/supportify_client/api/search.rb +0 -9
  25. data/lib/supportify_client/api/tag.rb +0 -17
  26. data/lib/supportify_client/api.rb +0 -5
  27. data/lib/supportify_client/client.rb +0 -49
  28. data/lib/supportify_client/factory.rb +0 -29
  29. data/lib/supportify_client/gateway.rb +0 -32
  30. data/lib/supportify_client/repository.rb +0 -23
  31. data/spec/features/categories_spec.rb +0 -55
  32. data/spec/features/client_spec.rb +0 -50
  33. data/spec/features/errors_spec.rb +0 -96
  34. data/spec/features/faqs_spec.rb +0 -55
  35. data/spec/features/search_spec.rb +0 -29
  36. data/spec/features/tags_spec.rb +0 -55
@@ -0,0 +1,161 @@
1
+ module Supportify
2
+ #
3
+ class Faq < BaseObject
4
+ attr_accessor :id, :answer, :categories, :controversy_score, :date_created, :date_last_modified, :direct_views, :question, :rating, :raw_score, :search_views, :tags, :total_views, :votes, :was_created_by, :was_last_modified_by
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # Unique identifier representing a specific content entry within an application.
10
+ :'id' => :'id',
11
+
12
+ # The body of the content entry. Can be an answer to a FAQ, a knowledge base entry, or any other type of string. This is a non-encoded string and may contain HTML.
13
+ :'answer' => :'answer',
14
+
15
+ #
16
+ :'categories' => :'categories',
17
+
18
+ # A score that measures the disparity between positive and negative votes for the content entry.
19
+ :'controversy_score' => :'controversy_score',
20
+
21
+ # The date and time that the content entry was created.
22
+ :'date_created' => :'date_created',
23
+
24
+ # The date and time that the content entry was last modified.
25
+ :'date_last_modified' => :'date_last_modified',
26
+
27
+ # The total number of views that the content entry has received individually (i.e., access via the &#39;/faqs/&lt;id&gt;&#39; path.
28
+ :'direct_views' => :'direct_views',
29
+
30
+ # The title of the content entry. Can be a question, a title, or any other type of string. This is a non-encoded string and may contain HTML.
31
+ :'question' => :'question',
32
+
33
+ # The score for the content entry within the application. This is weighted score tabulated based on a total of up and down votes and compared against other votes for content entries in the application.
34
+ :'rating' => :'rating',
35
+
36
+ # The total number of positive votes minus the number of negative votes for the content entry.
37
+ :'raw_score' => :'raw_score',
38
+
39
+ # The total number of views that the content entry has received as part of a set of search results (i.e., access via the &#39;/search&#39; path.
40
+ :'search_views' => :'search_views',
41
+
42
+ #
43
+ :'tags' => :'tags',
44
+
45
+ # The total number of views that the content entry has received as part of a whole collection, individually, or as part of a set of search results.
46
+ :'total_views' => :'total_views',
47
+
48
+ # The total number of votes that the content entry has received since it was created.
49
+ :'votes' => :'votes',
50
+
51
+ #
52
+ :'was_created_by' => :'was_created_by',
53
+
54
+ #
55
+ :'was_last_modified_by' => :'was_last_modified_by'
56
+
57
+ }
58
+ end
59
+
60
+ # attribute type
61
+ def self.swagger_types
62
+ {
63
+ :'id' => :'Integer',
64
+ :'answer' => :'String',
65
+ :'categories' => :'Array<Category>',
66
+ :'controversy_score' => :'Integer',
67
+ :'date_created' => :'DateTime',
68
+ :'date_last_modified' => :'DateTime',
69
+ :'direct_views' => :'Integer',
70
+ :'question' => :'String',
71
+ :'rating' => :'Float',
72
+ :'raw_score' => :'Integer',
73
+ :'search_views' => :'Integer',
74
+ :'tags' => :'Array<Tag>',
75
+ :'total_views' => :'Integer',
76
+ :'votes' => :'Integer',
77
+ :'was_created_by' => :'User',
78
+ :'was_last_modified_by' => :'User'
79
+
80
+ }
81
+ end
82
+
83
+ def initialize(attributes = {})
84
+ return if !attributes.is_a?(Hash) || attributes.empty?
85
+
86
+ # convert string to symbol for hash key
87
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
88
+
89
+
90
+ if attributes[:'id']
91
+ self.id = attributes[:'id']
92
+ end
93
+
94
+ if attributes[:'answer']
95
+ self.answer = attributes[:'answer']
96
+ end
97
+
98
+ if attributes[:'categories']
99
+ if (value = attributes[:'categories']).is_a?(Array)
100
+ self.categories = value
101
+ end
102
+ end
103
+
104
+ if attributes[:'controversy_score']
105
+ self.controversy_score = attributes[:'controversy_score']
106
+ end
107
+
108
+ if attributes[:'date_created']
109
+ self.date_created = attributes[:'date_created']
110
+ end
111
+
112
+ if attributes[:'date_last_modified']
113
+ self.date_last_modified = attributes[:'date_last_modified']
114
+ end
115
+
116
+ if attributes[:'direct_views']
117
+ self.direct_views = attributes[:'direct_views']
118
+ end
119
+
120
+ if attributes[:'question']
121
+ self.question = attributes[:'question']
122
+ end
123
+
124
+ if attributes[:'rating']
125
+ self.rating = attributes[:'rating']
126
+ end
127
+
128
+ if attributes[:'raw_score']
129
+ self.raw_score = attributes[:'raw_score']
130
+ end
131
+
132
+ if attributes[:'search_views']
133
+ self.search_views = attributes[:'search_views']
134
+ end
135
+
136
+ if attributes[:'tags']
137
+ if (value = attributes[:'tags']).is_a?(Array)
138
+ self.tags = value
139
+ end
140
+ end
141
+
142
+ if attributes[:'total_views']
143
+ self.total_views = attributes[:'total_views']
144
+ end
145
+
146
+ if attributes[:'votes']
147
+ self.votes = attributes[:'votes']
148
+ end
149
+
150
+ if attributes[:'was_created_by']
151
+ self.was_created_by = attributes[:'was_created_by']
152
+ end
153
+
154
+ if attributes[:'was_last_modified_by']
155
+ self.was_last_modified_by = attributes[:'was_last_modified_by']
156
+ end
157
+
158
+ end
159
+
160
+ end
161
+ end
@@ -0,0 +1,45 @@
1
+ module Supportify
2
+ #
3
+ class Info < BaseObject
4
+ attr_accessor :application, :supportify
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ #
10
+ :'application' => :'application',
11
+
12
+ #
13
+ :'supportify' => :'supportify'
14
+
15
+ }
16
+ end
17
+
18
+ # attribute type
19
+ def self.swagger_types
20
+ {
21
+ :'application' => :'Object',
22
+ :'supportify' => :'Object'
23
+
24
+ }
25
+ end
26
+
27
+ def initialize(attributes = {})
28
+ return if !attributes.is_a?(Hash) || attributes.empty?
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
32
+
33
+
34
+ if attributes[:'application']
35
+ self.application = attributes[:'application']
36
+ end
37
+
38
+ if attributes[:'supportify']
39
+ self.supportify = attributes[:'supportify']
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+ end
@@ -0,0 +1,53 @@
1
+ module Supportify
2
+ #
3
+ class Tag < BaseObject
4
+ attr_accessor :id, :description, :name
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # Unique identifier representing a specific tag within an application.
10
+ :'id' => :'id',
11
+
12
+ # Description of the tag.
13
+ :'description' => :'description',
14
+
15
+ # Display name of the tag.
16
+ :'name' => :'name'
17
+
18
+ }
19
+ end
20
+
21
+ # attribute type
22
+ def self.swagger_types
23
+ {
24
+ :'id' => :'Integer',
25
+ :'description' => :'String',
26
+ :'name' => :'String'
27
+
28
+ }
29
+ end
30
+
31
+ def initialize(attributes = {})
32
+ return if !attributes.is_a?(Hash) || attributes.empty?
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
36
+
37
+
38
+ if attributes[:'id']
39
+ self.id = attributes[:'id']
40
+ end
41
+
42
+ if attributes[:'description']
43
+ self.description = attributes[:'description']
44
+ end
45
+
46
+ if attributes[:'name']
47
+ self.name = attributes[:'name']
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+ end
@@ -0,0 +1,45 @@
1
+ module Supportify
2
+ #
3
+ class User < BaseObject
4
+ attr_accessor :id, :name
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # Unique identifier for the user.
10
+ :'id' => :'id',
11
+
12
+ # The name of the user.
13
+ :'name' => :'name'
14
+
15
+ }
16
+ end
17
+
18
+ # attribute type
19
+ def self.swagger_types
20
+ {
21
+ :'id' => :'Integer',
22
+ :'name' => :'String'
23
+
24
+ }
25
+ end
26
+
27
+ def initialize(attributes = {})
28
+ return if !attributes.is_a?(Hash) || attributes.empty?
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
32
+
33
+
34
+ if attributes[:'id']
35
+ self.id = attributes[:'id']
36
+ end
37
+
38
+ if attributes[:'name']
39
+ self.name = attributes[:'name']
40
+ end
41
+
42
+ end
43
+
44
+ end
45
+ end
@@ -1,18 +1,34 @@
1
- require 'rest_client'
1
+ # Common files
2
+ require 'supportify_client/api_client'
3
+ require 'supportify_client/api_error'
4
+ require 'supportify_client/configuration'
2
5
 
3
- require 'supportify_client/client'
4
- require 'supportify_client/version'
6
+ # Models
7
+ require 'supportify_client/models/base_object'
8
+ require 'supportify_client/models/info'
9
+ require 'supportify_client/models/category'
10
+ require 'supportify_client/models/tag'
11
+ require 'supportify_client/models/user'
12
+ require 'supportify_client/models/faq'
13
+ require 'supportify_client/models/error'
5
14
 
6
- module RestClient::AbstractResponse
7
- def success?
8
- (200..207).include? code
9
- end
10
- end
15
+ # APIs
16
+ require 'supportify_client/api/supportify_api'
11
17
 
12
- if !defined?(ActiveSupport) or ActiveSupport::VERSION::MAJOR < 3
13
- Array.class_eval do
14
- def extract_options!
15
- last.is_a?(::Hash) ? pop : {}
16
- end
18
+ module Supportify
19
+ class << self
20
+ # Configure sdk using block.
21
+ # Supportify.configure do |config|
22
+ # config.username = "xxx"
23
+ # config.password = "xxx"
24
+ # end
25
+ # If no block given, return the configuration singleton instance.
26
+ def configure
27
+ if block_given?
28
+ yield Configuration.instance
29
+ else
30
+ Configuration.instance
31
+ end
32
+ end
17
33
  end
18
- end
34
+ end
File without changes
@@ -2,16 +2,18 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
+ # stub: supportify_client 1.0.0 ruby lib
5
6
 
6
7
  Gem::Specification.new do |s|
7
8
  s.name = "supportify_client"
8
- s.version = "0.0.4"
9
+ s.version = "1.0.0"
9
10
 
10
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
11
13
  s.authors = ["Jordan Yaker", "Supportify, Inc."]
12
- s.date = "2014-09-06"
13
- s.description = "Ruby client for the Supportify.io help and support API."
14
- s.email = "jordan.yaker@supportify.io"
14
+ s.date = "2015-11-17"
15
+ s.description = "Supportify is the world's first Help Center as a Service that focuses on providing you with a smart help center to provide better help content in less time."
16
+ s.email = "help@supportify.io"
15
17
  s.extra_rdoc_files = [
16
18
  "LICENSE.txt",
17
19
  "README.rdoc"
@@ -26,41 +28,37 @@ Gem::Specification.new do |s|
26
28
  "Rakefile",
27
29
  "VERSION",
28
30
  "lib/supportify_client.rb",
29
- "lib/supportify_client/api.rb",
30
- "lib/supportify_client/api/category.rb",
31
- "lib/supportify_client/api/error.rb",
32
- "lib/supportify_client/api/faq.rb",
33
- "lib/supportify_client/api/search.rb",
34
- "lib/supportify_client/api/tag.rb",
35
- "lib/supportify_client/client.rb",
36
- "lib/supportify_client/factory.rb",
37
- "lib/supportify_client/gateway.rb",
38
- "lib/supportify_client/repository.rb",
31
+ "lib/supportify_client/api/supportify_api.rb",
32
+ "lib/supportify_client/api_client.rb",
33
+ "lib/supportify_client/api_error.rb",
34
+ "lib/supportify_client/configuration.rb",
35
+ "lib/supportify_client/models/base_object.rb",
36
+ "lib/supportify_client/models/category.rb",
37
+ "lib/supportify_client/models/error.rb",
38
+ "lib/supportify_client/models/faq.rb",
39
+ "lib/supportify_client/models/info.rb",
40
+ "lib/supportify_client/models/tag.rb",
41
+ "lib/supportify_client/models/user.rb",
39
42
  "lib/supportify_client/version.rb",
40
43
  "spec/factories.rb",
41
- "spec/features/categories_spec.rb",
42
- "spec/features/client_spec.rb",
43
- "spec/features/errors_spec.rb",
44
- "spec/features/faqs_spec.rb",
45
- "spec/features/search_spec.rb",
46
- "spec/features/tags_spec.rb",
44
+ "spec/features/.gitkeep",
47
45
  "spec/spec_helper.rb",
48
46
  "spec/support/factory_girl.rb",
49
47
  "spec/support/load_paths.rb",
50
48
  "spec/support/simple_cov.rb",
51
49
  "supportify_client.gemspec"
52
50
  ]
53
- s.homepage = "http://github.com/supportify/supportify_ruby"
51
+ s.homepage = "http://github.com/supportify/supportify-ruby"
54
52
  s.licenses = ["MIT"]
55
- s.require_paths = ["lib"]
56
- s.rubygems_version = "2.0.6"
57
- s.summary = "Ruby client for the Supportify.io help and support API."
53
+ s.rubygems_version = "2.4.8"
54
+ s.summary = "Ruby client library for Supportify.io."
58
55
 
59
56
  if s.respond_to? :specification_version then
60
57
  s.specification_version = 4
61
58
 
62
59
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
63
- s.add_runtime_dependency(%q<rest-client>, ["~> 1.7.1"])
60
+ s.add_runtime_dependency(%q<typhoeus>, ["~> 0.2"])
61
+ s.add_runtime_dependency(%q<json>, ["~> 1.4"])
64
62
  s.add_development_dependency(%q<rspec>, ["~> 2.8.0"])
65
63
  s.add_development_dependency(%q<yard>, ["~> 0.7"])
66
64
  s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
@@ -68,7 +66,8 @@ Gem::Specification.new do |s|
68
66
  s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
69
67
  s.add_development_dependency(%q<simplecov>, [">= 0"])
70
68
  else
71
- s.add_dependency(%q<rest-client>, ["~> 1.7.1"])
69
+ s.add_dependency(%q<typhoeus>, ["~> 0.2"])
70
+ s.add_dependency(%q<json>, ["~> 1.4"])
72
71
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
73
72
  s.add_dependency(%q<yard>, ["~> 0.7"])
74
73
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
@@ -77,7 +76,8 @@ Gem::Specification.new do |s|
77
76
  s.add_dependency(%q<simplecov>, [">= 0"])
78
77
  end
79
78
  else
80
- s.add_dependency(%q<rest-client>, ["~> 1.7.1"])
79
+ s.add_dependency(%q<typhoeus>, ["~> 0.2"])
80
+ s.add_dependency(%q<json>, ["~> 1.4"])
81
81
  s.add_dependency(%q<rspec>, ["~> 2.8.0"])
82
82
  s.add_dependency(%q<yard>, ["~> 0.7"])
83
83
  s.add_dependency(%q<rdoc>, ["~> 3.12"])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supportify_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jordan Yaker
@@ -9,22 +9,36 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-09-06 00:00:00.000000000 Z
12
+ date: 2015-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rest-client
15
+ name: typhoeus
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ~>
19
19
  - !ruby/object:Gem::Version
20
- version: 1.7.1
20
+ version: '0.2'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ~>
26
26
  - !ruby/object:Gem::Version
27
- version: 1.7.1
27
+ version: '0.2'
28
+ - !ruby/object:Gem::Dependency
29
+ name: json
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ~>
33
+ - !ruby/object:Gem::Version
34
+ version: '1.4'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ~>
40
+ - !ruby/object:Gem::Version
41
+ version: '1.4'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: rspec
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -109,8 +123,10 @@ dependencies:
109
123
  - - '>='
110
124
  - !ruby/object:Gem::Version
111
125
  version: '0'
112
- description: Ruby client for the Supportify.io help and support API.
113
- email: jordan.yaker@supportify.io
126
+ description: Supportify is the world's first Help Center as a Service that focuses
127
+ on providing you with a smart help center to provide better help content in less
128
+ time.
129
+ email: help@supportify.io
114
130
  executables: []
115
131
  extensions: []
116
132
  extra_rdoc_files:
@@ -126,30 +142,26 @@ files:
126
142
  - Rakefile
127
143
  - VERSION
128
144
  - lib/supportify_client.rb
129
- - lib/supportify_client/api.rb
130
- - lib/supportify_client/api/category.rb
131
- - lib/supportify_client/api/error.rb
132
- - lib/supportify_client/api/faq.rb
133
- - lib/supportify_client/api/search.rb
134
- - lib/supportify_client/api/tag.rb
135
- - lib/supportify_client/client.rb
136
- - lib/supportify_client/factory.rb
137
- - lib/supportify_client/gateway.rb
138
- - lib/supportify_client/repository.rb
145
+ - lib/supportify_client/api/supportify_api.rb
146
+ - lib/supportify_client/api_client.rb
147
+ - lib/supportify_client/api_error.rb
148
+ - lib/supportify_client/configuration.rb
149
+ - lib/supportify_client/models/base_object.rb
150
+ - lib/supportify_client/models/category.rb
151
+ - lib/supportify_client/models/error.rb
152
+ - lib/supportify_client/models/faq.rb
153
+ - lib/supportify_client/models/info.rb
154
+ - lib/supportify_client/models/tag.rb
155
+ - lib/supportify_client/models/user.rb
139
156
  - lib/supportify_client/version.rb
140
157
  - spec/factories.rb
141
- - spec/features/categories_spec.rb
142
- - spec/features/client_spec.rb
143
- - spec/features/errors_spec.rb
144
- - spec/features/faqs_spec.rb
145
- - spec/features/search_spec.rb
146
- - spec/features/tags_spec.rb
158
+ - spec/features/.gitkeep
147
159
  - spec/spec_helper.rb
148
160
  - spec/support/factory_girl.rb
149
161
  - spec/support/load_paths.rb
150
162
  - spec/support/simple_cov.rb
151
163
  - supportify_client.gemspec
152
- homepage: http://github.com/supportify/supportify_ruby
164
+ homepage: http://github.com/supportify/supportify-ruby
153
165
  licenses:
154
166
  - MIT
155
167
  metadata: {}
@@ -169,8 +181,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
181
  version: '0'
170
182
  requirements: []
171
183
  rubyforge_project:
172
- rubygems_version: 2.0.6
184
+ rubygems_version: 2.4.8
173
185
  signing_key:
174
186
  specification_version: 4
175
- summary: Ruby client for the Supportify.io help and support API.
187
+ summary: Ruby client library for Supportify.io.
176
188
  test_files: []
@@ -1,17 +0,0 @@
1
- module Supportify
2
- module Api
3
- class Category
4
- attr_accessor :id, :name, :description
5
-
6
- def self.resource_name
7
- 'categories'
8
- end
9
-
10
- def initialize(attributes = {})
11
- self.id = attributes['id']
12
- self.name = attributes['name']
13
- self.description = attributes['description']
14
- end
15
- end
16
- end
17
- end
@@ -1,13 +0,0 @@
1
- module Supportify
2
- module Api
3
- class Error < ::RuntimeError
4
- attr_accessor :code, :short_description, :long_description
5
-
6
- def initialize(attributes = {})
7
- self.code = attributes['code']
8
- self.short_description = attributes['short_description']
9
- self.long_description = attributes['long_description']
10
- end
11
- end
12
- end
13
- end
@@ -1,23 +0,0 @@
1
- module Supportify
2
- module Api
3
- class Faq
4
- attr_accessor :id, :question, :answer, :votes, :rating,
5
- :categories, :tags
6
-
7
- def self.resource_name
8
- 'faqs'
9
- end
10
-
11
- def initialize(attributes = {})
12
- self.id = attributes['id']
13
- self.question = attributes['question']
14
- self.answer = attributes['answer']
15
- self.rating = attributes['rating']
16
- self.votes = attributes['votes']
17
-
18
- self.categories = (attributes['categories'] || []).map { |c| Category.new c }
19
- self.tags = (attributes['tags'] || []).map { |t| Tag.new t }
20
- end
21
- end
22
- end
23
- end
@@ -1,9 +0,0 @@
1
- module Supportify
2
- module Api
3
- class Search
4
- def self.resource_name
5
- 'search'
6
- end
7
- end
8
- end
9
- end
@@ -1,17 +0,0 @@
1
- module Supportify
2
- module Api
3
- class Tag
4
- attr_accessor :id, :name, :description
5
-
6
- def self.resource_name
7
- 'tags'
8
- end
9
-
10
- def initialize(attributes = {})
11
- self.id = attributes['id']
12
- self.name = attributes['name']
13
- self.description = attributes['description']
14
- end
15
- end
16
- end
17
- end
@@ -1,5 +0,0 @@
1
- require 'supportify_client/api/category'
2
- require 'supportify_client/api/error'
3
- require 'supportify_client/api/faq'
4
- require 'supportify_client/api/search'
5
- require 'supportify_client/api/tag'