telegraph-ruby 0.1.1 → 0.1.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b71484a0bf34b0b632cb5c6f0f73551733e80367
4
- data.tar.gz: b67d02a7378ba04685361989510705c175ee2dbf
3
+ metadata.gz: c4a4ef1277a3841dba87d4d7211384882eaeb203
4
+ data.tar.gz: 4f05a0167bec6b99994ab2e234dea97d8641f42c
5
5
  SHA512:
6
- metadata.gz: b18ca1aa9c12afd4915dd73b0ce67b4f9b697ebdb8b9597cf0397dd7f554398b30ba3daaba9f7fb8e35fbe77481caa2d5bf7249c96063209b7ab6d1a354a410e
7
- data.tar.gz: 5a819f05542ea6486275bcdf734dbbc45cabcc9a2a1b4689918fa76fcc65929409e4d03eca4eb91add5f13792747f9ba937be5676d5b7828dba259074a13e6b2
6
+ metadata.gz: 6151cf8e7a6b35c331f6b2346aeeb7b73327f2a9e46074122def2f59d91dffd8b67ebb8779f6546b3c334755aa95812a6e295b0c1a926372c5b2acc7ad3a3057
7
+ data.tar.gz: 98f0b71b2798fd1b47406b4c7997bafc3ee507a6e7fb2561b59d6023cfd9da97d896cd18a06ea736e1d57af9cce39a42bc0f680b25c9d13f5a9786c1ce528f8c
data/lib/request.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  require 'httparty'
2
2
 
3
3
  module Request
4
- def post(method, query)
5
- data = HTTParty.post("https://api.telegra.ph/#{method}", query: query).parsed_response
4
+ def post(method, body)
5
+ data = HTTParty.post("https://api.telegra.ph/#{method}", body: body).parsed_response
6
6
  return data['result'] if data['result']
7
7
  data
8
8
  end
@@ -2,44 +2,44 @@ require "request.rb"
2
2
 
3
3
  class Telegraph include Request
4
4
 
5
- def createAccount(query)
5
+ def createAccount(body)
6
6
  method = 'createAccount'
7
- post(method, query)
7
+ post(method, body)
8
8
  end
9
9
 
10
- def createPage(query)
10
+ def createPage(body)
11
11
  method = 'createPage'
12
- post(method, query)
12
+ post(method, body)
13
13
  end
14
14
 
15
- def editAccountInfo(query)
15
+ def editAccountInfo(body)
16
16
  method = 'editAccountInfo'
17
- post(method, query)
17
+ post(method, body)
18
18
  end
19
19
 
20
- def editPage(query)
20
+ def editPage(body)
21
21
  method = 'editPage'
22
- post(method, query)
22
+ post(method, body)
23
23
  end
24
24
 
25
- def getAccountInfo(query)
25
+ def getAccountInfo(body)
26
26
  method = 'getAccountInfo'
27
- post(method, query)
27
+ post(method, body)
28
28
  end
29
29
 
30
- def getPage(query)
30
+ def getPage(body)
31
31
  method = 'getPage'
32
- post(method, query)
32
+ post(method, body)
33
33
  end
34
34
 
35
- def getPageList(query)
35
+ def getPageList(body)
36
36
  method = 'getPageList'
37
- post(method, query)
37
+ post(method, body)
38
38
  end
39
39
 
40
- def getViews(query)
40
+ def getViews(body)
41
41
  method = 'getViews'
42
- post(method, query)
42
+ post(method, body)
43
43
  end
44
44
 
45
45
  def revokeAccessToken(access_token)
@@ -3,7 +3,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
3
 
4
4
  Gem::Specification.new do |spec|
5
5
  spec.name = 'telegraph-ruby'
6
- spec.version = '0.1.1'
6
+ spec.version = '0.1.2'
7
7
  spec.authors = ['Maxim Hvaschinsky']
8
8
  spec.email = ['22division7@gmail.com']
9
9
  spec.date = '2017-09-27'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: telegraph-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maxim Hvaschinsky