ocall

package
v0.0.0-...-d727afa Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package ocall carries some shared utility code for calling the Twitter API v1.1.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HasMorePages

func HasMorePages(req *jape.Request) bool

HasMorePages reports whether the request has more pages to fetch. This is true for a freshly-constructed request, and for an invoked request where the server not reported a next-page token.

func ResetPageToken

func ResetPageToken(req *jape.Request)

ResetPageToken resets (clears) the request's current page token. Subsequently invoking the query will then fetch the first page of results.

Types

type UsersReply

type UsersReply struct {
	Data      []byte
	Users     []*types.User
	NextToken string
}

A UsersReply is the response from a request that returns users.

func GetUsers

func GetUsers(ctx context.Context, req *jape.Request, opts types.UserFields, cli *twitter.Client) (*UsersReply, error)

GetUsers invokes an API method that returns API v1.1 user objects and pagination metadata.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL