amaranth 0.5.0 → 0.6.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6c16c24781575326519c5ab7cbc37fba8f40638834e342b3430cc69738a7e257
4
- data.tar.gz: 7b46a95519ecd9150bfd447387df73a99f5656be644bed20ab4f5ba8864eb2b6
3
+ metadata.gz: b8c817cee07b1548c915ae7645140bf6ce0b67571fce3973da219b1ebcfea628
4
+ data.tar.gz: d8fae1968ea6e37d01255b9b35e0db7856e4ea954bd8dff2abe47f22d2c3ad46
5
5
  SHA512:
6
- metadata.gz: e342ec27957ab3a229cc62483600f5b82db557037014bc466b34f8182979db6909e0dd3f127df946fac6cded35da3b2748b7e6a2aec91d97ce5fd242cf6e482b
7
- data.tar.gz: 97ad051f175662417cce7009aedfeee5a18ae6f1f4bba7af0176fe38f80499606fa586f28bf9d6d0e006d220318dcffa15bd9fc7a8838caaba38698327418a39
6
+ metadata.gz: 1512d5148fd516eea11bd6e7c79477a61ab12f1e0c4a79c1d1a42cc54a33b6db6b16115c0b1c80e4b3be42f0cf153925712ae4276e75b6dd1830e4212bfaa46c
7
+ data.tar.gz: 38e03f37f6b1ea50f76aa0c2d604e219520cc43b80f9502139c649d689e95cb62828a2dc406ffcaa2537da05957c80a53718bf3e75997c5296ce7a77501965d7
@@ -0,0 +1,20 @@
1
+ require "amaranth/collection"
2
+ require "time"
3
+
4
+ module Amaranth
5
+ class Activity < Collection
6
+ def self.all team_slug:, type: nil, after: nil
7
+ url = "/api/teams/#{team_slug}/activity/?limit=100"
8
+ url += "&type=#{type}" if type
9
+ url += "&after=#{after.getutc.iso8601}" if after
10
+ fetch(url).map do |attributes|
11
+ new attributes.keep_if { |key, value| fields.include? key.to_sym }
12
+ end
13
+ end
14
+
15
+ field :type
16
+ field :date
17
+ field :video
18
+ field :language
19
+ end
20
+ end
data/lib/amaranth/team.rb CHANGED
@@ -21,6 +21,10 @@ module Amaranth
21
21
  def videos
22
22
  Video.all(team_slug: slug)
23
23
  end
24
+
25
+ def activity type: nil, after: nil
26
+ Activity.all(team_slug: slug, type: type, after: after)
27
+ end
24
28
  end
25
29
  end
26
30
 
@@ -1,3 +1,3 @@
1
1
  module Amaranth
2
- VERSION = "0.5.0"
2
+ VERSION = "0.6.0"
3
3
  end
data/lib/amaranth.rb CHANGED
@@ -4,6 +4,7 @@ require "amaranth/team"
4
4
  require "amaranth/project"
5
5
  require "amaranth/video"
6
6
  require "amaranth/language"
7
+ require "amaranth/activity"
7
8
 
8
9
  module Amaranth
9
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amaranth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Geisel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2026-08-05 00:00:00.000000000 Z
11
+ date: 2026-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -71,6 +71,7 @@ files:
71
71
  - bin/console
72
72
  - bin/setup
73
73
  - lib/amaranth.rb
74
+ - lib/amaranth/activity.rb
74
75
  - lib/amaranth/collection.rb
75
76
  - lib/amaranth/config.rb
76
77
  - lib/amaranth/language.rb