mushikago-sdk 0.3.7 → 0.4.0

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.
Files changed (117) hide show
  1. data/README.md +45 -1
  2. data/doc/Mushikago.html +3 -3
  3. data/doc/Mushikago/Auth.html +1 -1
  4. data/doc/Mushikago/Auth/Signature.html +2 -2
  5. data/doc/Mushikago/Auth/Signer.html +1 -1
  6. data/doc/Mushikago/Config.html +1 -1
  7. data/doc/Mushikago/Hotaru.html +3 -3
  8. data/doc/Mushikago/Hotaru/ClassifierJudgeRequest.html +307 -0
  9. data/doc/Mushikago/Hotaru/Client.html +3511 -155
  10. data/doc/Mushikago/Hotaru/CollocationCreateRequest.html +375 -0
  11. data/doc/Mushikago/Hotaru/CollocationDeleteRequest.html +307 -0
  12. data/doc/Mushikago/Hotaru/CollocationDownloadRequest.html +307 -0
  13. data/doc/Mushikago/Hotaru/CollocationGetRequest.html +309 -0
  14. data/doc/Mushikago/Hotaru/CollocationListRequest.html +313 -0
  15. data/doc/Mushikago/Hotaru/CollocationWordlistRequest.html +313 -0
  16. data/doc/Mushikago/Hotaru/DictionaryDeleteRequest.html +305 -0
  17. data/doc/Mushikago/Hotaru/DictionaryListRequest.html +309 -0
  18. data/doc/Mushikago/Hotaru/DictionaryPutRequest.html +342 -0
  19. data/doc/Mushikago/Hotaru/DomainCreateRequest.html +313 -0
  20. data/doc/Mushikago/Hotaru/DomainDeleteRequest.html +305 -0
  21. data/doc/Mushikago/Hotaru/DomainInfoRequest.html +307 -0
  22. data/doc/Mushikago/Hotaru/DomainListRequest.html +311 -0
  23. data/doc/Mushikago/Hotaru/TagDeleteRequest.html +307 -0
  24. data/doc/Mushikago/Hotaru/TagListRequest.html +307 -0
  25. data/doc/Mushikago/Hotaru/TagPutRequest.html +307 -0
  26. data/doc/Mushikago/Hotaru/TextDeleteRequest.html +309 -0
  27. data/doc/Mushikago/Hotaru/TextGetRequest.html +307 -0
  28. data/doc/Mushikago/Hotaru/TextListRequest.html +315 -0
  29. data/doc/Mushikago/Hotaru/TextPutRequest.html +311 -0
  30. data/doc/Mushikago/Hotaru/TextTagsetRequest.html +311 -0
  31. data/doc/Mushikago/Hotaru/WordGetRequest.html +307 -0
  32. data/doc/Mushikago/Hotaru/WordListRequest.html +311 -0
  33. data/doc/Mushikago/Http.html +3 -3
  34. data/doc/Mushikago/Http/Client.html +104 -13
  35. data/doc/Mushikago/Http/DeleteRequest.html +240 -0
  36. data/doc/Mushikago/Http/GetRequest.html +240 -0
  37. data/doc/Mushikago/Http/MultipartPostRequest.html +265 -0
  38. data/doc/Mushikago/Http/MultipartPutRequest.html +265 -0
  39. data/doc/Mushikago/Http/MultipartRequest.html +7 -11
  40. data/doc/Mushikago/Http/PostRequest.html +240 -0
  41. data/doc/Mushikago/Http/PutRequest.html +240 -0
  42. data/doc/Mushikago/Http/Request.html +46 -133
  43. data/doc/Mushikago/Http/Response.html +56 -1
  44. data/doc/Mushikago/Mitsubachi.html +3 -3
  45. data/doc/Mushikago/Mitsubachi/Client.html +2 -2
  46. data/doc/Mushikago/Mitsubachi/HttpFetchRequest.html +13 -57
  47. data/doc/Mushikago/Mitsubachi/HttpPushRequest.html +13 -57
  48. data/doc/Mushikago/Mitsubachi/Project.html +1 -1
  49. data/doc/Mushikago/Mitsubachi/ProjectCreateRequest.html +13 -57
  50. data/doc/Mushikago/Mitsubachi/ProjectDeleteRequest.html +13 -57
  51. data/doc/Mushikago/Mitsubachi/ProjectDiscontinueRequest.html +13 -57
  52. data/doc/Mushikago/Mitsubachi/ProjectInfoRequest.html +13 -8
  53. data/doc/Mushikago/Mitsubachi/ProjectListRequest.html +13 -8
  54. data/doc/Mushikago/Mitsubachi/ProjectQueuesRequest.html +13 -8
  55. data/doc/Mushikago/Mitsubachi/ProjectUpdateRequest.html +13 -57
  56. data/doc/Mushikago/Mitsubachi/Projects.html +1 -1
  57. data/doc/Mushikago/Mitsubachi/Resource.html +1 -1
  58. data/doc/Mushikago/Mitsubachi/ResourceDeleteRequest.html +13 -57
  59. data/doc/Mushikago/Mitsubachi/ResourceGetRequest.html +13 -8
  60. data/doc/Mushikago/Mitsubachi/ResourceListRequest.html +13 -8
  61. data/doc/Mushikago/Mitsubachi/ResourceStoreRequest.html +13 -57
  62. data/doc/Mushikago/Mitsubachi/Resources.html +1 -1
  63. data/doc/Mushikago/Mitsubachi/Script.html +1 -1
  64. data/doc/Mushikago/Mitsubachi/ScriptDeleteRequest.html +13 -57
  65. data/doc/Mushikago/Mitsubachi/ScriptDeployRequest.html +13 -57
  66. data/doc/Mushikago/Mitsubachi/ScriptGetRequest.html +13 -8
  67. data/doc/Mushikago/Mitsubachi/ScriptListRequest.html +13 -8
  68. data/doc/Mushikago/Mitsubachi/Scripts.html +1 -1
  69. data/doc/Mushikago/Tombo.html +3 -3
  70. data/doc/Mushikago/Tombo/CaptureRequest.html +13 -57
  71. data/doc/Mushikago/Tombo/CapturesRequest.html +13 -8
  72. data/doc/Mushikago/Tombo/Client.html +2 -2
  73. data/doc/Mushikago/Tombo/DeleteRequest.html +13 -57
  74. data/doc/Mushikago/Tombo/InfoRequest.html +13 -8
  75. data/doc/_index.html +227 -29
  76. data/doc/class_list.html +1 -1
  77. data/doc/file.README.html +51 -2
  78. data/doc/index.html +51 -2
  79. data/doc/method_list.html +728 -256
  80. data/doc/top-level-namespace.html +1 -1
  81. data/lib/mushikago/hotaru.rb +35 -12
  82. data/lib/mushikago/hotaru/classifier_judge_request.rb +16 -0
  83. data/lib/mushikago/hotaru/client.rb +325 -27
  84. data/lib/mushikago/hotaru/collocation_create_request.rb +35 -0
  85. data/lib/mushikago/hotaru/collocation_delete_request.rb +16 -0
  86. data/lib/mushikago/hotaru/collocation_download_request.rb +16 -0
  87. data/lib/mushikago/hotaru/collocation_get_request.rb +18 -0
  88. data/lib/mushikago/hotaru/collocation_list_request.rb +23 -0
  89. data/lib/mushikago/hotaru/collocation_wordlist_request.rb +22 -0
  90. data/lib/mushikago/hotaru/dictionary_delete_request.rb +14 -0
  91. data/lib/mushikago/hotaru/dictionary_list_request.rb +23 -0
  92. data/lib/mushikago/hotaru/dictionary_put_request.rb +26 -0
  93. data/lib/mushikago/hotaru/domain_create_request.rb +23 -0
  94. data/lib/mushikago/hotaru/domain_delete_request.rb +14 -0
  95. data/lib/mushikago/hotaru/domain_info_request.rb +20 -0
  96. data/lib/mushikago/hotaru/domain_list_request.rb +21 -0
  97. data/lib/mushikago/hotaru/tag_delete_request.rb +18 -0
  98. data/lib/mushikago/hotaru/tag_list_request.rb +16 -0
  99. data/lib/mushikago/hotaru/tag_put_request.rb +17 -0
  100. data/lib/mushikago/hotaru/text_delete_request.rb +18 -0
  101. data/lib/mushikago/hotaru/text_get_request.rb +16 -0
  102. data/lib/mushikago/hotaru/text_list_request.rb +25 -0
  103. data/lib/mushikago/hotaru/text_put_request.rb +20 -0
  104. data/lib/mushikago/hotaru/text_tagset_request.rb +20 -0
  105. data/lib/mushikago/hotaru/word_get_request.rb +16 -0
  106. data/lib/mushikago/hotaru/word_list_request.rb +20 -0
  107. data/lib/mushikago/http/client.rb +5 -1
  108. data/lib/mushikago/http/request.rb +5 -0
  109. data/lib/mushikago/http/response.rb +7 -0
  110. data/lib/mushikago/version.rb +1 -1
  111. data/spec/mushikago/auth/signature_spec.rb +1 -2
  112. data/spec/mushikago/http/client_spec.rb +3 -2
  113. data/spec/mushikago/http/request_spec.rb +1 -3
  114. data/spec/mushikago/tombo/client_spec.rb +3 -2
  115. metadata +72 -21
  116. data/lib/mushikago/hotaru/request.rb +0 -32
  117. data/spec/mushikago/tombo/request_spec.rb +0 -23
@@ -0,0 +1,35 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class CollocationCreateRequest < Mushikago::Http::PostRequest
5
+ def path; '/1/hotaru/collocation/create' end
6
+ request_parameter :domain_name
7
+ request_parameter :tags do |v| [v].flatten.compact.join(',') end
8
+ request_parameter :parts_of_speech do |v| [v].flatten.compact.join(',') end
9
+ request_parameter :collocation_name
10
+ request_parameter :lower_threshold
11
+ request_parameter :upper_threshold
12
+ request_parameter :description
13
+
14
+ def initialize domain_name, tags, options={}
15
+ super(options)
16
+ self.domain_name = domain_name
17
+ self.tags = tags
18
+ self.parts_of_speech = options[:parts_of_speech] if options.has_key?(:parts_of_speech)
19
+ self.collocation_name = options[:collocation_name] if options.has_key?(:collocation_name)
20
+ self.lower_threshold = options[:lower_threshold] if options.has_key?(:lower_threshold)
21
+ self.upper_threshold = options[:upper_threshold] if options.has_key?(:upper_threshold)
22
+ self.description = options[:description] if options.has_key?(:description)
23
+ end
24
+
25
+ # 多くの情報を使って共起グラフを作成する品詞セットです
26
+ POS_LARGE = %w(動詞 形容詞 形容動詞 名詞 代名詞 数詞 連体詞 副詞 接続詞 感動詞 助動詞 助詞)
27
+
28
+ # 中程度の情報を使って共起グラフを作成する品詞セットです
29
+ POS_MEDIUM = %w(動詞 形容詞 形容動詞 名詞 副詞 助動詞 助詞)
30
+
31
+ # 少しの情報を使って共起グラフを作成する品詞セットです
32
+ POS_SMALL = %w(動詞 形容詞 名詞)
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,16 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class CollocationDeleteRequest < Mushikago::Http::DeleteRequest
5
+ def path; '/1/hotaru/collocation/delete' end
6
+ request_parameter :domain_name
7
+ request_parameter :collocation_id
8
+
9
+ def initialize domain_name, collocation_id, options={}
10
+ super(options)
11
+ self.domain_name = domain_name
12
+ self.collocation_id = collocation_id
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class CollocationDownloadRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/collocation/download' end
6
+ request_parameter :domain_name
7
+ request_parameter :collocation_id
8
+
9
+ def initialize domain_name, collocation_id, options={}
10
+ super(options)
11
+ self.domain_name = domain_name
12
+ self.collocation_id = collocation_id
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,18 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class CollocationGetRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/collocation/get' end
6
+ request_parameter :domain_name
7
+ request_parameter :collocation_id
8
+ request_parameter :word
9
+
10
+ def initialize domain_name, collocation_id, word, options={}
11
+ super(options)
12
+ self.domain_name = domain_name
13
+ self.collocation_id = collocation_id
14
+ self.word = word
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,23 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class CollocationListRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/collocation/list' end
6
+ request_parameter :domain_name
7
+ request_parameter :limit do |v| v.to_i.to_s end
8
+ request_parameter :offset do |v| v.to_i.to_s end
9
+ request_parameter :filter
10
+ request_parameter :status
11
+
12
+ def initialize domain_name, options={}
13
+ super(options)
14
+ self.domain_name = domain_name
15
+ self.limit = options[:limit] if options.has_key?(:limit)
16
+ self.offset = options[:offset] if options.has_key?(:offset)
17
+ self.filter = options[:filter] if options.has_key?(:filter)
18
+ self.status = options[:status] if options.has_key?(:status)
19
+ end
20
+ end
21
+ end
22
+ end
23
+
@@ -0,0 +1,22 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class CollocationWordlistRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/collocation/wordlist' end
6
+ request_parameter :domain_name
7
+ request_parameter :collocation_id
8
+ request_parameter :limit do |v| v.to_i.to_s end
9
+ request_parameter :offset do |v| v.to_i.to_s end
10
+ request_parameter :filter
11
+
12
+ def initialize domain_name, collocation_id, options={}
13
+ super(options)
14
+ self.domain_name = domain_name
15
+ self.collocation_id = collocation_id
16
+ self.limit = options[:limit] if options.has_key?(:limit)
17
+ self.offset = options[:offset] if options.has_key?(:offset)
18
+ self.filter = options[:filter] if options.has_key?(:filter)
19
+ end
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,14 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class DictionaryDeleteRequest < Mushikago::Http::DeleteRequest
5
+ def path; '/1/hotaru/dictionary/delete' end
6
+ request_parameter :dictionary_id
7
+
8
+ def initialize dictionary_id, options={}
9
+ super(options)
10
+ self.dictionary_id = dictionary_id
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,23 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class DictionaryListRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/dictionary/list' end
6
+ request_parameter :limit do |v| v.to_i.to_s end
7
+ request_parameter :offset do |v| v.to_i.to_s end
8
+ request_parameter :filter
9
+
10
+ def initialize options={}
11
+ super(options)
12
+ self.limit = options[:limit] if options.has_key?(:limit)
13
+ self.offset = options[:offset] if options.has_key?(:offset)
14
+ self.filter = options[:filter] if options.has_key?(:filter)
15
+ end
16
+ end
17
+ end
18
+ end
19
+
20
+
21
+
22
+
23
+
@@ -0,0 +1,26 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class DictionaryPutRequest < Mushikago::Http::MultipartPutRequest
5
+ def path; '/1/hotaru/dictionary/put' end
6
+ request_parameter :dictionary_file
7
+ request_parameter :dictionary_name
8
+ request_parameter :description
9
+
10
+ def initialize file_or_file_name, options={}
11
+ super(options)
12
+ if(file_or_file_name.kind_of?(File))
13
+ self.dictionary_file = file_or_file_name
14
+ else
15
+ self.dictionary_file = File.new(file_or_file_name.to_s)
16
+ end
17
+ self.dictionary_name = options[:dictionary_name] if options.has_key?(:dictionary_name)
18
+ self.description = options[:description] if options.has_key?(:description)
19
+ end
20
+ end
21
+ end
22
+ end
23
+
24
+
25
+
26
+
@@ -0,0 +1,23 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class DomainCreateRequest < Mushikago::Http::PostRequest
5
+ def path; '/1/hotaru/domain/create' end
6
+ request_parameter :domain_name
7
+ request_parameter :splitter
8
+ request_parameter :description
9
+ request_parameter :dictionary_ids do |v| [v].flatten.compact.join(',') end
10
+ request_parameter :tags do |v| [v].flatten.compact.join(',') end
11
+
12
+ def initialize domain_name, splitter, options={}
13
+ super(options)
14
+ self.domain_name = domain_name
15
+ self.splitter = splitter
16
+ self.description = options[:description] if options.has_key?(:description)
17
+ self.dictionary_ids = options[:dictionary_ids] if options.has_key?(:dictionary_ids)
18
+ self.tags = options[:tags] if options.has_key?(:tags)
19
+ end
20
+ end
21
+ end
22
+ end
23
+
@@ -0,0 +1,14 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class DomainDeleteRequest < Mushikago::Http::DeleteRequest
5
+ def path; '/1/hotaru/domain/delete' end
6
+ request_parameter :domain_name
7
+
8
+ def initialize domain_name, options={}
9
+ super(options)
10
+ self.domain_name = domain_name
11
+ end
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,20 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class DomainInfoRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/domain/info' end
6
+ request_parameter :domain_name
7
+ request_parameter :time do |v| v.to_i end
8
+
9
+ def initialize domain_name, options={}
10
+ super(options)
11
+ self.domain_name = domain_name
12
+ self.time = options[:time] if options.has_key?(:time)
13
+ end
14
+ end
15
+ end
16
+ end
17
+
18
+
19
+
20
+
@@ -0,0 +1,21 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class DomainListRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/domain/list' end
6
+ request_parameter :limit do |v| v.to_i.to_s end
7
+ request_parameter :offset do |v| v.to_i.to_s end
8
+ request_parameter :filter
9
+ request_parameter :status
10
+
11
+ def initialize options={}
12
+ super(options)
13
+ self.limit = options[:limit] if options.has_key?(:limit)
14
+ self.offset = options[:offset] if options.has_key?(:offset)
15
+ self.filter = options[:filter] if options.has_key?(:filter)
16
+ self.status = options[:status] if options.has_key?(:status)
17
+ end
18
+ end
19
+ end
20
+ end
21
+
@@ -0,0 +1,18 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class TagDeleteRequest < Mushikago::Http::DeleteRequest
5
+ def path; '/1/hotaru/tag/delete' end
6
+ request_parameter :domain_name
7
+ request_parameter :tag
8
+
9
+ def initialize domain_name, tag, options={}
10
+ super(options)
11
+ self.domain_name = domain_name
12
+ self.tag = tag
13
+ end
14
+ end
15
+ end
16
+ end
17
+
18
+
@@ -0,0 +1,16 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class TagListRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/tag/list' end
6
+ request_parameter :domain_name
7
+ request_parameter :filter
8
+
9
+ def initialize domain_name, options={}
10
+ super(options)
11
+ self.domain_name = domain_name
12
+ self.filter = options[:filter] if options.has_key?(:filter)
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,17 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class TagPutRequest < Mushikago::Http::PutRequest
5
+ def path; '/1/hotaru/tag/put' end
6
+ request_parameter :domain_name
7
+ request_parameter :tag
8
+
9
+ def initialize domain_name, tag, options={}
10
+ super(options)
11
+ self.domain_name = domain_name
12
+ self.tag = tag
13
+ end
14
+ end
15
+ end
16
+ end
17
+
@@ -0,0 +1,18 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class TextDeleteRequest < Mushikago::Http::DeleteRequest
5
+ def path; '/1/hotaru/text/delete' end
6
+ request_parameter :domain_name
7
+ request_parameter :text_id
8
+ request_parameter :forcedelete, :default=>true do |v| (v ? 1 : 0).to_s end
9
+
10
+ def initialize domain_name, text_id, options={}
11
+ super(options)
12
+ self.domain_name = domain_name
13
+ self.text_id = text_id
14
+ self.forcedelete = options[:forcedelete]
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,16 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class TextGetRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/text/get' end
6
+ request_parameter :domain_name
7
+ request_parameter :text_id
8
+
9
+ def initialize domain_name, text_id, options={}
10
+ super(options)
11
+ self.domain_name = domain_name
12
+ self.text_id = text_id
13
+ end
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,25 @@
1
+ # -*- coding: utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class TextListRequest < Mushikago::Http::GetRequest
5
+ def path; '/1/hotaru/text/list' end
6
+ request_parameter :domain_name
7
+ request_parameter :limit do |v| v.to_i.to_s end
8
+ request_parameter :offset do |v| v.to_i.to_s end
9
+ request_parameter :filter
10
+ request_parameter :tags do |v| [v].flatten.compact.join(',') end
11
+ request_parameter :status
12
+
13
+ def initialize domain_name, options={}
14
+ super(options)
15
+ self.domain_name = domain_name
16
+ self.limit = options[:limit] if options.has_key?(:limit)
17
+ self.offset = options[:offset] if options.has_key?(:offset)
18
+ self.filter = options[:filter] if options.has_key?(:filter)
19
+ self.tags = options[:tags] if options.has_key?(:tags)
20
+ self.status = options[:status] if options.has_key?(:status)
21
+ end
22
+ end
23
+ end
24
+ end
25
+
@@ -0,0 +1,20 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class TextPutRequest < Mushikago::Http::PutRequest
5
+ def path; '/1/hotaru/text/put' end
6
+ request_parameter :domain_name
7
+ request_parameter :tags do |v| [v].flatten.compact.join(',') end
8
+ request_parameter :text
9
+ request_parameter :text_name
10
+
11
+ def initialize domain_name, text, tags, options={}
12
+ super(options)
13
+ self.domain_name = domain_name
14
+ self.text = text
15
+ self.tags = tags
16
+ self.text_name = options[:text_name] if options.has_key?(:text_name)
17
+ end
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,20 @@
1
+ # -*- coding : utf-8 -*-
2
+ module Mushikago
3
+ module Hotaru
4
+ class TextTagsetRequest < Mushikago::Http::PostRequest
5
+ def path; '/1/hotaru/text/tagset' end
6
+ request_parameter :domain_name
7
+ request_parameter :text_id
8
+ request_parameter :tags do |v| [v].flatten.compact.join(',') end
9
+ request_parameter :replace, :default=>false do |v| (v ? 1 : 0).to_s end
10
+
11
+ def initialize domain_name, text_id, tags, options={}
12
+ super(options)
13
+ self.domain_name = domain_name
14
+ self.text_id = text_id
15
+ self.tags = tags
16
+ self.replace = options[:replace]
17
+ end
18
+ end
19
+ end
20
+ end