@@ -14,6 +14,7 @@ with Github4s, you can interact with:
14
14
- [ Starring] ( #starring )
15
15
- [ List stargazers] ( #list-stargazers )
16
16
- [ List starred repositories] ( #list-starred-repositories )
17
+ - [ List public organization events] ( #list-public-organization-events )
17
18
18
19
The following examples assume the following code:
19
20
@@ -106,6 +107,29 @@ The `result` on the right is the corresponding [List[StarredRepository]][activit
106
107
See [ the API doc] ( https://developer.github.com/v3/activity/starring/#list-repositories-being-starred )
107
108
for full reference.
108
109
110
+ ### List public organization events
111
+
112
+ You can list the events of a particular public organization with ` listPublicOrganizationEvents ` ; it takes
113
+ as arguments:
114
+
115
+ - ` org ` : name of the organization for which we want to retrieve the events.
116
+ - ` pagination ` : Limit and Offset for pagination, optional.
117
+
118
+ To list the events for org ` 47degrees ` :
119
+
120
+ ``` scala mdoc:compile-only
121
+ val listPublicOrganizationEvents = gh.activities.listPublicOrganizationEvents(" 47degrees" )
122
+ listPublicOrganizationEvents.flatMap(_.result match {
123
+ case Left (e) => IO .println(s " Something went wrong: ${e.getMessage}" )
124
+ case Right (r) => IO .println(r)
125
+ })
126
+ ```
127
+
128
+ The ` result ` on the right is the corresponding [ List[ PublicOrganizationEvent]] [ activity-scala ] .
129
+
130
+ See [ the API doc] ( https://docs.github.com/en/rest/activity/events#list-public-organization-events )
131
+ for full reference.
132
+
109
133
As you can see, a few features of the activity endpoint are missing.
110
134
111
135
As a result, if you'd like to see a feature supported, feel free to create an issue and/or a pull request!
0 commit comments