handa-gdata-0.6.4: Library and command-line utility for accessing Google services and APIs.

Safe HaskellNone

Network.Google

Contents

Description

Helper functions for accessing Google APIs.

Synopsis

Types

type AccessToken = ByteStringSource

OAuth 2.0 access token.

toAccessTokenSource

Arguments

:: String

The string.

-> AccessToken

The OAuth 2.0 access token.

Convert a string to an access token.

Functions

appendBodySource

Arguments

:: ByteString

The data for the body.

-> Request m

The request.

-> Request m

The request with the body appended.

Append a body to a request.

appendHeadersSource

Arguments

:: [(String, String)]

The (name/key, value) pairs for the headers.

-> Request m

The request.

-> Request m

The request with the additional headers.

Append headers to a request.

appendQuerySource

Arguments

:: [(String, String)]

The query keys and values.

-> Request m

The request.

-> Request m

The request with the query appended.

Append a query to a request.

doManagedRequestSource

Arguments

:: DoRequest a 
=> Manager

The conduit HTTP manager.

-> Request (ResourceT IO)

The request.

-> IO a

The action returning the result of performing the request.

doRequestSource

Arguments

:: DoRequest a 
=> Request (ResourceT IO)

The request.

-> IO a

The action returning the result of performing the request.

Perform a request.

makeHeaderNameSource

Arguments

:: String

The name.

-> CI ByteString

The prepared name. TODO: In principle, we should UTF-8 encode the bytestrings packed below.

Prepare a name/key for a header.

makeProjectRequestSource

Arguments

:: ProjectId

The project ID.

-> AccessToken

The OAuth 2.0 access token.

-> (String, String)

The Google API name and version.

-> String

The HTTP method.

-> (String, String)

The host and path for the request.

-> Request m

The HTTP request.

Construct a project-related Google API request.

makeRequestSource

Arguments

:: AccessToken

The OAuth 2.0 access token.

-> (String, String)

The Google API name and version.

-> String

The HTTP method.

-> (String, String)

The host and path for the request.

-> Request m

The HTTP request.

Construct a Google API request.

makeRequestValueSource

Arguments

:: String

The string.

-> ByteString

The prepared string. TODO: In principle, we should UTF-8 encode the bytestrings packed below.

Prepare a string for inclusion in a request.