(t *testing.T)
| 130 | } |
| 131 | |
| 132 | func TestGetEnrichedActivities(t *testing.T) { |
| 133 | ctx := context.Background() |
| 134 | client, requester := newClient(t) |
| 135 | _, err := client.GetEnrichedActivitiesByID(ctx, []string{"foo", "bar", "baz"}, stream.WithEnrichReactionCounts()) |
| 136 | require.NoError(t, err) |
| 137 | testRequest(t, requester.req, http.MethodGet, "https://api.stream-io-api.com/api/v1.0/enrich/activities/?api_key=key&ids=foo%2Cbar%2Cbaz&withReactionCounts=true", "") |
| 138 | _, err = client.GetEnrichedActivitiesByForeignID( |
| 139 | ctx, |
| 140 | []stream.ForeignIDTimePair{ |
| 141 | stream.NewForeignIDTimePair("foo", stream.Time{}), |
| 142 | stream.NewForeignIDTimePair("bar", stream.Time{Time: time.Time{}.Add(time.Second)}), |
| 143 | }, |
| 144 | stream.WithEnrichReactionCounts(), |
| 145 | ) |
| 146 | require.NoError(t, err) |
| 147 | testRequest(t, requester.req, http.MethodGet, "https://api.stream-io-api.com/api/v1.0/enrich/activities/?api_key=key&foreign_ids=foo%2Cbar×tamps=0001-01-01T00%3A00%3A00%2C0001-01-01T00%3A00%3A01&withReactionCounts=true", "") |
| 148 | } |
| 149 | |
| 150 | func TestGetReactions(t *testing.T) { |
| 151 | ctx := context.Background() |
nothing calls this directly
no test coverage detected