rubysky 0.2.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c44c04b8d9e7b9719cf9a8be4d5b9ac1686ceafb5470da8cafc35dab72bc048a
4
- data.tar.gz: 962796e252ca7c90ee9eb9c206f052f4f5c5f48d74f861f58ebbabd885127de2
3
+ metadata.gz: e6be362a96034c153bc6cd9e9d5737a9ef5eeef478f475a67ebf602f38f5dae8
4
+ data.tar.gz: 1ef05e55261c62a371bf01bc35407597a4bd60588d372319b899779afcda702e
5
5
  SHA512:
6
- metadata.gz: 3ce2eded0373f75effd5ef2d98734687c6e353e4b5a353239205bd34ca48d68479b5cb4ed48babedc0d39607b39c11450b191b7d01346b621db09e150b881a80
7
- data.tar.gz: e4f77dac156e47b273bdf44a485dfab7764accecb3229920eee9802d46653df73d6e57d806540112e436d552007db430f4ebd2c04778019c29e426a65534e48d
6
+ metadata.gz: 62fe028987c92fc49e4db38b47a570ff999ca000ac0510b554c8e510faf59315929481dca4045209c7754cf0c6d98f6687e748e475907314d9dc16f2d974e261
7
+ data.tar.gz: c6c34eda9ba22628a5124a7051146cafe3a88cee6c926326c0ed171c030035808a9a32b25d99b26c3afd6f53d3f424b9dc66f1d4309505f9b281091cd7002b5f
@@ -41,6 +41,21 @@ module RubySky
41
41
  @client.session.did_doc.did_doc
42
42
  end
43
43
 
44
+ def user_info
45
+ {
46
+ "pds" => @client.pds,
47
+ "access_jwt" => @client.session.access_jwt,
48
+ "refresh_jwt" => @client.session.refresh_jwt,
49
+ "did" => @client.session.did_doc.did,
50
+ "did_doc" => @client.session.did_doc.did_doc,
51
+ "email" => @client.session.email,
52
+ "email_confirmed" => @client.session.email_confirmed,
53
+ "email_auth_factor" => @client.session.email_auth_factor,
54
+ "active" => @client.session.active,
55
+ "status" => @client.session.status
56
+ }.compact
57
+ end
58
+
44
59
  def handle
45
60
  @client.session.handle
46
61
  end
@@ -7,11 +7,15 @@ module RubySky
7
7
  @images = images
8
8
  end
9
9
 
10
- def to_json(*_args)
10
+ def as_json(*_args)
11
11
  {
12
12
  "$type": "app.bsky.embed.images",
13
13
  images: @images
14
- }.to_json
14
+ }
15
+ end
16
+
17
+ def to_json(*_args)
18
+ as_json.to_json
15
19
  end
16
20
  end
17
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RubySky
4
- VERSION = "0.2.1"
4
+ VERSION = "0.4.0"
5
5
  end
data/sig/rubysky.rbs CHANGED
@@ -11,6 +11,7 @@ module RubySky
11
11
  def post: (text: String, images: Array[{data: IO, mime_type: String, ?alt: String}]) -> Post
12
12
  def refresh_jwt: () -> String
13
13
  def user_did: () -> Hash[String, untyped]
14
+ def user_info: () -> Hash[String, untyped]
14
15
  def handle: () -> String
15
16
 
16
17
  attr_reader client: Raw::Client
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubysky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kugayama Nana
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-12-12 00:00:00.000000000 Z
11
+ date: 2024-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jwt