hiya 0.2.0 → 0.2.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
  SHA256:
3
- metadata.gz: a17b8a35230831183946a90c4104030acbc22763411f3f28562ec23fefac0e69
4
- data.tar.gz: 67b4d9fb4fd6de89ff00c0c589f43b7d4803acabd57976ffb8d65ddf76cb757a
3
+ metadata.gz: 1c7150741025cac9f749783c3d17e164d124aa6a4ceb0663adaae16227c1f399
4
+ data.tar.gz: 9d3395a271694ba7f781b545599625bb8dc38218302cfaafe98baca81df6823e
5
5
  SHA512:
6
- metadata.gz: 311ab3e4ac8bcc998a0501fbaa1a4cd3db94dca6e12da0c0502c2a2590198966ade8e4eef16f0ec96b5186b0aa63de0b3a393d433d8848f6a57c060119cd89bb
7
- data.tar.gz: 42c6f7fb6f7ce7db2029ef443bdfc7849bc69019a1fe9a8dfe7612b9bb1e062d78d383ce7ddbd32394c158dc085b53bc5c27930cd13127bed7d940081a3a3185
6
+ metadata.gz: b4ba172893dd357f07c0b0e6c579a96241fe38c5fc8005a1856babf783b89a43d550da835a0b3452948ae7c3c15989d23fa8e0a4c11894edc5efcf59373f0198
7
+ data.tar.gz: 6551e86750b03d6c0cf0e187b643a5f54e82304042901b6d0569be8fee7c83e48b4775f6fcd56b8564f1ec583ad13a6172511da3e1a5ddf2ba74254d2345d1a0
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hiya (0.2.0)
4
+ hiya (0.2.2)
5
5
  faraday (~> 2.0)
6
6
  faraday-multipart (~> 1.0)
7
7
 
data/README.md CHANGED
@@ -138,6 +138,12 @@ Hiya::Users::Links.new(response[:token]).all
138
138
  Hiya::Users::Links.new(response[:token]).find(code)
139
139
  ```
140
140
 
141
+ ### Get link analytic
142
+
143
+ ``` ruby
144
+ Hiya::Users::Links.new(response[:token]).analytic(code)
145
+ ```
146
+
141
147
  ### Append files attach to link
142
148
 
143
149
  ``` ruby
@@ -17,6 +17,13 @@ module Hiya
17
17
  {}
18
18
  end
19
19
 
20
+ def analytics(code)
21
+ @response = conn.get("/v1/users/links/#{code}/analytics")
22
+ Oj.load(response.body, symbol_keys: true)
23
+ rescue StandardError => _e
24
+ {}
25
+ end
26
+
20
27
  # code: a2e1M
21
28
  # files: Array[String]: ['/path/to/file1', '/path/to/file2', ...]
22
29
  def attach_files(code, files)
@@ -52,6 +59,19 @@ module Hiya
52
59
  {}
53
60
  end
54
61
 
62
+ # code: a2e1M
63
+ # params: Hash: {
64
+ # new_code: String: 'TheAvengersEndGame'
65
+ # }
66
+ def update_code(code, params)
67
+ @response = conn.put("/v1/users/links/#{code}/code") do |req|
68
+ req.body = params.to_json
69
+ end
70
+ Oj.load(response.body, symbol_keys: true)
71
+ rescue StandardError => _e
72
+ {}
73
+ end
74
+
55
75
  # code: a2e1M
56
76
  # params: Hash: {
57
77
  # ip: String: "125.227.100.100",
data/lib/hiya/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Hiya
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.2'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-07-28 00:00:00.000000000 Z
11
+ date: 2023-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday