Documentation ¶
Overview ¶
Package fbbatch provides a Client with single call semantics which will automatically use Facebook Graph Batch implementation under the hood.
This allows for transparently using batching for greater efficiency. You should be aware of how the Facebook Graph API resource limits are applicable for your use case and configure the client appropriately.
For the official documentation look at: https://developers.facebook.com/docs/reference/api/batch/
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Client *fbapi.Client AccessToken string AppID uint64 // Capacity of log channel. Defaults to 1000. PendingWorkCapacity uint // Maximum number of items in a batch. Defaults to 50. MaxBatchSize uint // Amount of time after which to send a pending batch. Defaults to 10ms. BatchTimeout time.Duration // contains filtered or unexported fields }
Client with the same interface as fbapi.Client but one where the underlying requests are automatically batched together.
type Request ¶
type Request struct { Name string `json:"name,omitempty"` Method string `json:"method,omitempty"` RelativeURL string `json:"relative_url"` Body string `json:"body,omitempty"` }
Request in a Batch.
Click to show internal directories.
Click to hide internal directories.