bskyrb 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/bskyrb/version.rb +1 -1
- data/lib/bskyrb/xrpc.rb +24 -0
- data/lib/bskyrb.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acb1d587977217b5e0e2e373c422fe69702364524c29d96ddf6b3cf5c537eed5
|
4
|
+
data.tar.gz: 7094841141b05f7b24024c6ebd5df494486f125202ce2ceb79e06ef29b9512dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 012464fcc4bf3c84ada9a11b0f9bc7b13d7bcbff3378cc9724822474daa11eeb37b718589498f15885b9efc4694b0e46b8884d00af3e2a7126dcead4ff3d2fd0
|
7
|
+
data.tar.gz: 26cea956181b0d593a7e164de63b8d48293c94308d2bba3c53461add0d5254f229bb9072198fa661f4f6c2df526ab9429bf7804b3c1672512f11419a1ccea279
|
data/lib/bskyrb/version.rb
CHANGED
data/lib/bskyrb/xrpc.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
# typed: false
|
2
|
+
require "uri"
|
3
|
+
require "httparty"
|
4
|
+
require "json"
|
5
|
+
|
6
|
+
module XRPC
|
7
|
+
class Endpoint
|
8
|
+
attr_reader :request_uri
|
9
|
+
|
10
|
+
def initialize(pds, endpoint_location, *params)
|
11
|
+
@pds = pds
|
12
|
+
@endpoint_location = endpoint_location
|
13
|
+
@params = params
|
14
|
+
end
|
15
|
+
|
16
|
+
def get(params)
|
17
|
+
query_params = URI.encode_www_form(params)
|
18
|
+
@request_uri = URI("#{@pds}/xrpc/#{@endpoint_location}?#{query_params}")
|
19
|
+
|
20
|
+
response = HTTParty.get(@request_uri)
|
21
|
+
JSON.parse(response.body)
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/bskyrb.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bskyrb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Shreyan Jain
|
@@ -68,6 +68,7 @@ files:
|
|
68
68
|
- "./lib/bskyrb/records.rb"
|
69
69
|
- "./lib/bskyrb/session.rb"
|
70
70
|
- "./lib/bskyrb/version.rb"
|
71
|
+
- "./lib/bskyrb/xrpc.rb"
|
71
72
|
homepage: https://github.com/ShreyanJain9/bskyrb
|
72
73
|
licenses:
|
73
74
|
- MIT
|