Categorygithub.com/getstream/stream-go2
modulepackage
3.2.1+incompatible
Repository: https://github.com/getstream/stream-go2.git
Documentation: pkg.go.dev

# README

stream-go2

stream-go2 is a Go client for Stream API.

You can sign up for a Stream account at getstream.io/get_started.

Build Status godoc codecov Go Report Card

Contents

Usage

Get the client:

$ go get gopkg.in/GetStream/stream-go2.v1

stream-go2 uses dep for managing dependencies (see Gopkg.toml and Gopkg.lock). You can get required dependencies simply by running:

$ dep ensure

Even better: at Stream we have developed vg, a powerful workspace manager for Go based on dep itself. If you use vg (and you should!) you can just:

$ vg init && vg ensure

Creating a Client

key := "YOUR_API_KEY"
secret := "YOUR_API_SECRET"

client, err := stream.NewClient(key, secret)
if err != nil {
    // ...
}

You can pass additional options when creating a client using the available ClientOption functions:

client, err := stream.NewClient(key, secret,
    stream.WithAPIRegion("us-east"),
    stream.WithAPIVersion("1.0"),
    ...,
)

You can also create a client using environment variables:

client, err := stream.NewClientFromEnv()

Available environment variables:

  • STREAM_API_KEY
  • STREAM_API_SECRET
  • STREAM_API_REGION
  • STREAM_API_VERSION

Creating a Feed

Create a flat feed from slug and user ID:

flat, err := client.FlatFeed("user", "123")

Create an aggregated feed from slug and user ID:

aggr, err := client.AggregatedFeed("aggregated", "123")

Create a notification feed from slug and user ID:

notif, err := client.NotificationFeed("notification", "123")

Flat, aggregated, and notification feeds implement the Feed interface methods.

In the snippets below, feed indicates any kind of feed, while flat, aggregated, and notification are used to indicate that only that kind of feed has certain methods or can perform certain operations.

Retrieving activities

Flat feeds

resp, err := flat.GetActivities()
if err != nil {
    // ...
}

fmt.Println("Duration:", resp.Duration)
fmt.Println("Next:", resp.Next)
fmt.Println("Activities:")
for _, activity := range resp.Results {
    fmt.Println(activity)
}

You can retrieve flat feeds with custom ranking, using the dedicated method:

resp, err := flat.GetActivitiesWithRanking("popularity")
if err != nil {
    // ...
}

Aggregated feeds

resp, err := aggregated.GetActivities()
if err != nil {
    // ...
}

fmt.Println("Duration:", resp.Duration)
fmt.Println("Next:", resp.Next)
fmt.Println("Groups:")
for _, group := range resp.Results {
    fmt.Println("Group:", group.Name, "ID:", group.ID, "Verb:", group.Verb)
    fmt.Println("Activities:", group.ActivityCount, "Actors:", group.ActorCount)
    for _, activity := range group.Activities {
        // ...
    }
}

Notification feeds

resp, err := notification.GetActivities()
if err != nil {
    // ...
}

fmt.Println("Duration:", resp.Duration)
fmt.Println("Next:", resp.Next)
fmt.Println("Unseen:", resp.Unseen, "Unread:", resp.Unread)
fmt.Println("Groups:")
for _, group := range resp.Results {
    fmt.Println("Group:", group.Group, "ID:", group.ID, "Verb:", group.Verb)
    fmt.Println("Seen:", group.IsSeen, "Read:", group.IsRead)
    fmt.Println("Activities:", group.ActivityCount, "Actors:", group.ActorCount)
    for _, activity := range group.Activities {
        // ...
    }
}

Options

You can pass supported options and filters when retrieving activities:

resp, err := flat.GetActivities(
    stream.WithActivitiesIDGTE("f505b3fb-a212-11e7-..."),
    stream.WithActivitiesLimit(5),
    ...,
)

Adding activities

Add a single activity:

resp, err := feed.AddActivity(stream.Activity{Actor: "bob", ...})
if err != nil {
    // ...
}

fmt.Println("Duration:", resp.Duration)
fmt.Println("Activity:", resp.Activity) // resp wraps the stream.Activity type

Add multiple activities:

a1 := stream.Activity{Actor: "bob", ...}
a2 := stream.Activity{Actor: "john", ...}
a3 := stream.Activity{Actor: "alice", ...}

resp, err := feed.AddActivities(a1, a2, a3)
if err != nil {
    // ...
}

fmt.Println("Duration:", resp.Duration)
fmt.Println("Activities:")
for _, activity := range resp.Activities {
    fmt.Println(activity)
}

Updating activities

err := feed.UpdateActivities(a1, a2, ...)
if err != nil {
    // ...
}

Partially updating activities

You can partial update activities identified either by ID:

changesetA := stream.NewUpdateActivityRequestByID("f505b3fb-a212-11e7-...", map[string]interface{}{"key": "new-value"}, []string{"removed", "keys"})
changesetB := stream.NewUpdateActivityRequestByID("f707b3fb-a212-11e7-...", map[string]interface{}{"key": "new-value"}, []string{"removed", "keys"})
resp, err := client.PartialUpdateActivities(changesetA, changesetB)
if err != nil {
    // ...
}

or by a ForeignID and timestamp pair:

changesetA := stream.NewUpdateActivityRequestByForeignID("dothings:1", stream.Time{...}, map[string]interface{}{"key": "new-value"}, []string{"removed", "keys"})
changesetB := stream.NewUpdateActivityRequestByForeignID("dothings:2", stream.Time{...}, map[string]interface{}{"key": "new-value"}, []string{"removed", "keys"})
resp, err := client.PartialUpdateActivities(changesetA, changesetB)
if err != nil {
    // ...
}

Removing activities

You can either remove activities by ID or ForeignID:

err := feed.RemoveActivityByID("f505b3fb-a212-11e7-...")
if err != nil {
    // ...
}

err := feed.RemoveActivityByForeignID("bob:123")
if err != nil {
    // ...
}

Following another feed

err := feed.Follow(anotherFeed)
if err != nil {
    // ...
}

Beware that it's possible to follow only flat feeds.

Options

You can pass options to the Follow method. For example:

err := feed.Follow(anotherFeed,
    stream.WithFollowFeedActivityCopyLimit(15),
    ...,
)

Retrieving followers and followings

Following

Get the feeds that a feed is following:

resp, err := feed.GetFollowing()
if err != nil {
    // ...
}

fmt.Println("Duration:", resp.Duration)
for _, followed := range resp.Results {
    fmt.Println(followed.FeedID, followed.TargetID)
}

You can pass options to GetFollowing:

resp, err := feed.GetFollowing(
    stream.WithFollowingLimit(5),
    ...,
)

Followers

resp, err := flat.GetFollowers()
if err != nil {
    // ...
}

fmt.Println("Duration:", resp.Duration)
for _, follower := range resp.Results {
    fmt.Println(follower.FeedID, follower.TargetID)
}

Note: this is only possible for FlatFeed types.

You can pass options to GetFollowers:

resp, err := feed.GetFollowing(
    stream.WithFollowersLimit(5),
    ...,
)

Unfollowing a feed

err := flat.Unfollow(anotherFeed)
if err != nil {
    // ...
}

You can pass options to Unfollow:

err := flat.Unfollow(anotherFeed,
    stream.WithUnfollowKeepHistory(true),
    ...,
)

Updating an activity's to targets

Remove all old targets and set new ones (replace):

newTargets := []stream.Feed{f1, f2}

err := feed.UpdateToTargets(activity, stream.WithToTargetsNew(newTargets...))
if err != nil {
    // ...
}

Add some targets and remove some others:

add := []stream.Feed{target1, target2}
remove := []stream.Feed{oldTarget1, oldTarget2}

err := feed.UpdateToTargets(
    activity,
    stream.WithToTargetsAdd(add),
    stream.WithToTargetsRemove(remove),
)
if err != nil {
    // ...
}

Note: you can't mix stream.WithToTargetsNew with stream.WithToTargetsAdd or stream.WithToTargetsRemove.

Batch adding activities

You can add the same activities to multiple feeds at once with the (*Client).AddToMany method (docs):

err := client.AddToMany(activity,
    feed1, feed2, ...,
)
if err != nil {
    // ...
}

Batch creating follows

You can create multiple follow relationships at once with the (*Client).FollowMany method (docs):

relationships := []stream.FollowRelationship{
    stream.NewFollowRelationship(source, target),
    ...,
}

err := client.FollowMany(relationships)
if err != nil {
    // ...
}

Realtime tokens

You can get a token suitable for client-side real-time feed updates as:

// Read+Write token
token := feed.RealtimeToken(false)

// Read-only token
readonlyToken := feed.RealtimeToken(true)

Analytics

If your app is enabled for analytics collection you can use the Go client to track events. The main documentation for the analytics features is available in our Docs page.

Obtaining an Analytics client

You can obtain a specialized Analytics client (*stream.AnalyticsClient) from a regular client, which you can use to track events:

// Create the client
analytics := client.Analytics()

Tracking engagement

Engagement events can be tracked with the TrackEngagement method of AnalyticsClient. It accepts any number of EngagementEvents.

Events' syntax is not checked by the client, so be sure to follow our documentation about it.

Events are simple maps, but the stream package offers handy helpers to populate such events easily.

// Create the event
event := stream.EngagementEvent{}.
    WithLabel("click").
    WithForeignID("event:1234").
    WithUserData(stream.NewUserData().String("john")).
    WithFeatures(
        stream.NewEventFeature("color", "blue"),
        stream.NewEventFeature("shape", "rectangle"),
    ).
    WithLocation("homepage")

// Track the event(s)
err := analytics.TrackEngagement(event)
if err != nil {
    // ...
}

Tracking impressions

Impression events can be tracked with the TrackImpression method of AnalyticsClient (syntax docs):

// Create the impression events
imp := stream.ImpressionEventData{}.
    WithForeignIDs("product:1", "product:2", "product:3").
    WithUserData(stream.NewUserData().String("john")).
    WithLocation("storepage")

// Track the events
err := analytics.TrackImpression(imp)
if err != nil {
    // ...
}

Email tracking

You can generate URLs to track events and redirect to a specific URL with the RedirectAndTrack method of AnalyticsClient (syntax docs). It accepts any number of engagement and impression events:

// Create the events
engagement := stream.EngagementEvent{}.
    WithLabel("click").
    WithForeignID("event:1234").
    WithUserData(stream.NewUserData().String("john")).
    WithFeatures(
        stream.NewEventFeature("color", "blue"),
        stream.NewEventFeature("shape", "rectangle"),
    ).
    WithLocation("homepage")

impressions := stream.ImpressionEventData{}.
    WithForeignIDs("product:1", "product:2", "product:3").
    WithUserData(stream.NewUserData().String("john")).
    WithLocation("storepage")

// Generate the tracking and redirect URL, which once followed
// will redirect the user to the targetURL.
targetURL := "https://google.com"
url, err := analytics.RedirectAndTrack(targetURL, engagement, impression)
if err != nil {
    // ...
}

// Display the obtained url where needed.

Personalization

Personalization endpoints for enabled apps can be reached using a PersonalizationClient, a specialized client obtained with the Personalization() function of a regular Client.

personalization := client.Personalization()

The PersonalizationClient exposes three functions that you can use to retrieve and manipulate data: Get, Post, and Delete.

For example, to retrieve follow recommendations:

// Get follow recommendations
data := map[string]interface{}{
    "user_id":          123,
    "source_feed_slug": "timeline",
    "target_feed_slug": "user",
}
resp, err = personalization.Get("follow_recommendations", data)
if err != nil {
    // ...
}
fmt.Println(resp)

See the complete docs and examples about personalization features on Stream's documentation pages.

Collections

Collections endpoints can be reached using a specialized CollectionsClient which, like PersonalizationClient, can be obtained from a regular Client:

collections := client.Collections()

CollectionsClient exposes three batch functions, Upsert, Select, and DeleteMany as well as CRUD functions: Add, Get, Update, Delete:

// Upsert the "picture" collection
object := stream.CollectionObject{
    ID:   "123",
    Data: map[string]interface{}{
        "name": "Rocky Mountains",
        "location": "North America",
    },
}
err = collections.Upsert("picture", object)
if err != nil {
    // ...
}

// Get the data from the "picture" collection for ID "123" and "456"
objects, err := collections.Select("picture", "123", "456")
if err != nil {
    // ...
}

// Delete the data from the "picture" collection for picture with ID "123"
err = collections.Delete("picture", "123")
if err != nil {
    // ...
}

// Get a single collection object from the "pictures" collection with ID "123"
err = collections.Delete("pictures", "123")
if err != nil {
    // ...
}

See the complete docs and examples about collections on Stream's documentation pages.

Users

Users endpoints can be reached using a specialized UsersClient which, like CollectionsClient, can be obtained from a regular Client:

users := client.Users()

UsersClient exposes CRUD functions: Add, Get, Update, Delete:

user := stream.User{
    ID: "123",
    Data: map[string]interface{}{
        "name": "Bobby Tables",
    },
}

insertedUser, err := users.Add(user, false)
if err != nil {
    // ...
}

newUserData :=map[string]interface{}{
    "name": "Bobby Tables",
    "age": 7,
}

updatedUser, err := users.Update("123", newUserData)
if err != nil {
    // ...
}

err = users.Delete("123")
if err != nil {
    // ...
}

See the complete docs and examples about users on Stream's documentation pages.

Reactions

Reactions endpoints can be reached using a specialized Reactions which, like CollectionsClient, can be obtained from a regular Client:

reactions := client.Reactions()

Reactions exposes CRUD functions: Add, Get, Update, Delete, as well as two specialized functions AddChild and Filter:

r := stream.AddReactionRequestObject{
    Kind: "comment",
    UserID: "123",
    ActivityID: "87a9eec0-fd5f-11e8-8080-80013fed2f5b",
    Data: map[string]interface{}{
        "text": "Nice post!!",
    },
    TargetFeeds: []string{"user:bob", "timeline:alice"},
}

comment, err := reactions.Add(r)
if err != nil {
    // ...
}

like := stream.AddReactionRequestObject{
    Kind: "like",
    UserID: "456",
}

childReaction, err := reactions.AddChild(comment.ID, like)
if err != nil {
    // ...
}

//If we fetch the "comment" reaction now, it will have the child reaction(s) present.
parent, err := reactions.Get(comment.ID)
if err != nil {
    // ...
}

for kind, children := range parent.ChildrenReactions {
    //child reactions are grouped by kind
}

//update the target feeds for the `comment` reaction
updatedReaction, err := reactions.Update(comment.ID, nil, []string{"timeline:jeff"})
if err != nil {
    // ...
}

//get all reactions for the activity "87a9eec0-fd5f-11e8-8080-80013fed2f5b", paginated 5 at a time, including the activity data
response, err := reactions.Filter(stream.ByActivityID("87a9eec0-fd5f-11e8-8080-80013fed2f5b"), stream.WithLimit(5), stream.WithActivityData())
if err != nil {
    // ...
}

//since we requested the activity, it will be present in the response
fmt.Println(response.Activity)

for _, reaction := range response.Results{
    //do something for each reaction
}

//get the next page of reactions
response, err = reactions.GetNextPageFilteredReactions(response)
if err != nil {
    // ...
}

// get all likes by user "123"
response, err = reactions.Filter(stream.ByUserID("123").ByKind("like"))
if err != nil {
    // ...
}

See the complete docs and examples about reactions on Stream's documentation pages.

Enrichment

Enrichment is a way of retrieving activities from feeds in which references to Users and Collections will be replaced with the corresponding objects

FlatFeed, AggregatedFeed and NotificationFeed each have a GetEnrichedActivities function to retrieve enriched activities.


u := stream.User{
    ID: "123",
    Data: map[string]interface{}{
        "name": "Bobby Tables",
    },
}

//We add a user
user, err := client.Users().Add(u, true)
if err != nil {
    // ...
}

c := stream.CollectionObject{
    ID: "123",
    Data: map[string]interface{}{
        "name":     "Rocky Mountains",
        "location": "North America",
    },
}

//We add a colection object
collectionObject, err := client.Collections().Add("picture", c)
if err != nil {
    // ...
}

act := stream.Activity{
    Time:      stream.Time{Time: time.Now()},
    Actor:     client.Users().CreateReference(user.ID),
    Verb:      "post",
    Object:    client.Collections().CreateReference("picture", collectionObject.ID),
    ForeignID: "picture:1",
}


//We add the activity to the user's feed
feed, _ := client.FlatFeed("user", "123")
_, err = feed.AddActivity(act)
if err != nil {
    // ...
}

result, err := feed.GetActivities()
if err != nil {
    // ...
}
fmt.Println(result.Results[0].Actor) // Will ouput the user reference
fmt.Println(result.Results[0].Object) // Will ouput the collection reference

enrichedResult, err := feed.GetEnrichedActivities()
if err != nil {
    // ...
}
fmt.Println(enrichedResult.Results[0]["actor"].(map[string]interface{})) // Will output the user object
fmt.Println(enrichedResult.Results[0]["object"].(map[string]interface{})) // Will output the collection object

See the complete docs and examples about enrichment on Stream's documentation pages.

License

stream-go2 is licensed under the GNU General Public License v3.0.

Permissions of this strong copyleft license are conditioned on making available complete source code of licensed works and modifications, which include larger works using a licensed work, under the same license. Copyright and license notices must be preserved. Contributors provide an express grant of patent rights.

See the LICENSE file.

We're hiring!

Would you like to work on cool projects like this?

We are currently hiring for talented Gophers in Amsterdam and Boulder, get in touch with us if you are interested! [email protected]

# Functions

ByActivityID will filter reactions based on the specified activity id.
ByReactionID will filter reactions based on the specified parent reaction id.
ByUserID will filter reactions based on the specified user id.
NewClient builds a new Client with the provided API key and secret.
NewClientFromEnv build a new Client using environment variables values, with possible values being STREAM_API_KEY, STREAM_API_SECRET, STREAM_API_REGION, and STREAM_API_VERSION.
NewEventFeature returns a new EventFeature from the given group and value params.
NewFollowRelationship is a helper for creating a FollowRelationship from the source ("follower") and target ("following") feeds.
NewForeignIDTimePair creates a new ForeignIDTimePair with the given foreign ID and timestamp.
NewUpdateActivityRequestByForeignID creates a new UpdateActivityRequest to be used by PartialUpdateActivities.
NewUpdateActivityRequestByID creates a new UpdateActivityRequest to be used by PartialUpdateActivities.
NewUserData initializes an empty UserData type, which must be populated using the String, Int, and/or Alias methods.
ToAPIError tries to cast the provided error to APIError type, returning the obtained APIError and whether the operation was successful.
WithActivitiesIDGT adds the id_gt parameter to API calls, used when retrieving paginated activities from feeds, returning activities with ID greater than the provided id.
WithActivitiesIDGTE adds the id_gte parameter to API calls, used when retrieving paginated activities from feeds, returning activities with ID greater or equal than the provided id.
WithActivitiesIDLT adds the id_lt parameter to API calls, used when retrieving paginated activities from feeds, returning activities with ID lesser than the provided id.
WithActivitiesIDLTE adds the id_lte parameter to API calls, used when retrieving paginated activities from feeds, returning activities with ID lesser or equal than the provided id.
WithActivitiesLimit adds the limit parameter to API calls which support it, limiting the number of results in the response to the provided limit threshold.
WithActivitiesOffset adds the offset parameter to API calls which support it, getting results starting from the provided offset index.
WithActivityData will enable returning the activity data when filtering reactions by activity_id.
WithAPIRegion sets the region for a given Client.
WithAPIVersion sets the version for a given Client.
WithCustomParam adds a custom parameter to the read request.
WithEnrichOwnChildren enriches the activities with the children reactions.
WithEnrichOwnReactions enriches the activities with the reactions to them.
WithEnrichReactionCounts enriches the activities with the reaction counts.
WithEnrichmReactionKindsFilter filters the reactions by the specified kinds.
WithEnrichRecentReactions enriches the activities with the recent reactions to them.
WithEnrichRecentReactionsLimit specifies how many recent reactions to include in the enrichment.
WithFollowersLimit limits the number of followers in the response to the provided limit.
WithFollowersOffset returns followers starting from the given offset.
WithFollowFeedActivityCopyLimit sets the activity copy threshold for Follow Feed API calls.
WithFollowingFilter adds the filter parameter to API calls, used when retrieving following feeds, allowing the check whether certain feeds are being followed.
WithFollowingLimit limits the number of followings in the response to the provided limit.
WithFollowingOffset returns followings starting from the given offset.
WithFollowManyActivityCopyLimit sets how many activities should be copied from the target feed.
WithFollowRelationshipActivityCopyLimit sets the ActivityCopyLimit field for a given FollowRelationship.
WithHTTPRequester sets the HTTP requester for a given client, used mostly for testing.
WithIDGT adds the id_gt parameter to API calls, used when retrieving paginated reactions.
WithIDGTE adds the id_gte parameter to API calls, used when retrieving paginated reactions, returning activities with ID greater or equal than the provided id.
WithIDLT adds the id_lt parameter to API calls, used when retrieving paginated reactions.
WithIDLTE adds the id_lte parameter to API calls, used when retrieving paginated reactions.
WithLimit adds the limit parameter to the Reactions.Filter() call.
WithNotificationsMarkRead marks as read the given activity ids in a notification feed.
WithNotificationsMarkSeen marks as seen the given activity ids in a notification feed.
WithOwnChildren will enable returning the children reactions when filtering reactions by parent ID.
WithToTargetsAdd sets the add to targets, adding them to the activity's existing ones.
WithToTargetsNew sets the new to targets, replacing all the existing ones.
WithToTargetsRemove sets the remove to targets, removing them from activity's the existing ones.
WithUnfollowKeepHistory adds the keep_history parameter to API calls, used to keep history when unfollowing feeds, rather than purging it (default behavior).
WithUserID adds the user id to the Collections.Add request object.

# Constants

ReactionTimeLayout is the time parse layout for Stream Reaction API JSON time fields.
TimeLayout is the default time parse layout for Stream API JSON time fields.

# Variables

ErrInvalidNextPage is returned when trying to read the next page of a response which has an invalid "next" field.
ErrMissingNextPage is returned when trying to read the next page of a response which has an empty "next" field.
Version is the current release version for this client.

# Structs

Activity is a Stream activity entity.
ActivityGroup is a group of Activity obtained from aggregated feeds.
AddActivitiesResponse is the API response obtained when adding activities to a feed.
AddActivityResponse is the API response obtained when adding a single activity to a feed.
AddReactionRequestObject is an object used only when calling the Add* reaction endpoints.
AddToManyRequest is the API request body for adding an activity to multiple feeds at once.
AggregatedFeed is a Stream aggregated feed, which contains activities grouped based on the grouping function defined on the dashboard.
AggregatedFeedResponse is the API response obtained when retrieving activities from an aggregated feed.
AnalyticsClient is a specialized client used to send and track analytics events for enabled apps.
APIError is an error returned by Stream API when the request cannot be performed or errored server side.
Client is a Stream API client used for retrieving feeds and performing API calls.
CollectionObject is a collection's object.
CollectionsClient is a specialized client used to interact with the Collection endpoints.
Data is a representation of an enriched activities enriched object, such as the the user or the object.
Duration wraps time.Duration, used because of JSON marshaling and unmarshaling.
EnrichedActivity is an enriched Stream activity entity.
EnrichedActivityGroup is a group of enriched Activities obtained from aggregated feeds.
EnrichedAggregatedFeedResponse is the API response obtained when retrieving enriched activities from an aggregated feed.
EnrichedFlatFeedResponse is the API response obtained when retrieving enriched activities from a flat feed.
EnrichedNotificationFeedResponse is the API response obtained when retrieving enriched activities from a notification feed.
EnrichedNotificationFeedResult is a notification-feed specific response, containing the list of enriched activities in the group, plus the extra fields about the group read+seen status.
EnrichedReaction is an enriched Stream reaction entity.
EventFeature is a single analytics event feature, a pair of group and value strings.
FilterReactionResponse is the response received from the ReactionsClient.Filter call.
FilterReactionsOption is an option used by Reactions.Filter() to support pagination.
FlatFeed is a Stream flat feed.
FlatFeedResponse is the API response obtained when retrieving activities from a flat feed.
Follower is the representation of a feed following another feed.
FollowersOption is an option usable by followers feed methods.
FollowersResponse is the API response obtained when retrieving followers from a feed.
FollowingOption is an option usable by following feed methods.
FollowingResponse is the API response obtained when retrieving following feeds from a feed.
FollowManyOption is an option to customize behavior of Follow Many calls.
FollowRelationship represents a follow relationship between a source ("follower") and a target ("following"), used for FollowMany requests.
ForeignIDTimePair couples an activity's foreignID and timestamp.
GetActivitiesOption is an option usable by GetActivities methods for flat and aggregated feeds.
GetActivitiesResponse contains a slice of Activity returned by GetActivitiesByID and GetActivitiesByForeignID requests.
GetCollectionResponseObject represent a single response coming from a Collection Get request after a CollectionsClient.Get call.
NotificationFeed is a Stream notification feed.
NotificationFeedResponse is the API response obtained when retrieving activities from a notification feed.
NotificationFeedResult is a notification-feed specific response, containing the list of activities in the group, plus the extra fields about the group read+seen status.
PersonalizationClient is a specialized client for personalization features.
PersonalizationResponse is a generic response from the personalization endpoints obtained after a PersonalizationClient.Get call.
Reaction is a reaction retrieved from the API.
ReactionsClient is a specialized client used to interact with the Reactions endpoints.
Time wraps time.Time, used because of custom API time format in JSON marshaling and unmarshaling.
UnfollowOption is an option usable with the Unfollow feed method.
UnfollowRelationship represents a single follow relationship to remove, used for UnfollowMany requests.
No description provided by the author
UpdateActivityRequest is the API request body for partially updating an activity.
UpdateActivityResponse is the response returned by the UpdateActivityByID and UpdateActivityByForeignID methods.
User represents a user.
UserData represents an analytics event user data field, which can either be a single string/integer representing the user's ID, or a dictionary made of an ID (string or integer) and a string alias.
UsersClient is a specialized client used to interact with the Users endpoints.

# Interfaces

No description provided by the author
Feed is a generic Stream feed, exporting the generic functions common to any Stream feed.
Requester performs HTTP requests.

# Type aliases

AddObjectOption is an option usable by the Collections.Add method.
ClientOption is a function used for adding specific configuration options to a Stream client.
EngagementEvent represent an analytics engagement event.
FilterReactionsAttribute specifies the filtering method of Reactions.Filter().
FollowFeedOption is a function used to customize FollowFeed API calls.
FollowRelationshipOption customizes a FollowRelationship.
ImpressionEventsData represents the payload of an arbitrary number of impression events.
UpdateToTargetsOption determines what operations perform during an UpdateToTargets API call.