mobileanalytics

package
v0.9.17 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2015 License: Apache-2.0 Imports: 8 Imported by: 28

Documentation

Overview

Package mobileanalytics provides a client for Amazon Mobile Analytics.

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	// A collection of key-value pairs that give additional context to the event.
	// The key-value pairs are specified by the developer.
	//
	// This collection can be empty or the attribute object can be omitted.
	Attributes map[string]*string `locationName:"attributes" type:"map"`

	// A name signifying an event that occurred in your app. This is used for grouping
	// and aggregating like events together for reporting purposes.
	EventType *string `locationName:"eventType" min:"1" type:"string" required:"true"`

	// A collection of key-value pairs that gives additional, measurable context
	// to the event. The key-value pairs are specified by the developer.
	//
	// This collection can be empty or the attribute object can be omitted.
	Metrics map[string]*float64 `locationName:"metrics" type:"map"`

	// The session the event occured within.
	Session *Session `locationName:"session" type:"structure"`

	// The time the event occurred in ISO 8601 standard date time format. For example,
	// 2014-06-30T19:07:47.885Z
	Timestamp *string `locationName:"timestamp" type:"string" required:"true"`

	// The version of the event.
	Version *string `locationName:"version" min:"1" type:"string"`
	// contains filtered or unexported fields
}

A JSON object representing a batch of unique event occurrences in your app.

func (Event) GoString added in v0.6.5

func (s Event) GoString() string

GoString returns the string representation

func (Event) String added in v0.6.5

func (s Event) String() string

String returns the string representation

type MobileAnalytics

type MobileAnalytics struct {
	*service.Service
}

Amazon Mobile Analytics is a service for collecting, visualizing, and understanding app usage data at scale.

func New

func New(config *aws.Config) *MobileAnalytics

New returns a new MobileAnalytics client.

func (*MobileAnalytics) PutEvents

func (c *MobileAnalytics) PutEvents(input *PutEventsInput) (*PutEventsOutput, error)

The PutEvents operation records one or more events. You can have up to 1,500 unique custom events per app, any combination of up to 40 attributes and metrics per custom event, and any number of attribute or metric values.

Example
// THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT.

package main

import (
	"bytes"
	"fmt"
	"time"

	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/service/mobileanalytics"
)

var _ time.Duration
var _ bytes.Buffer

func main() {
	svc := mobileanalytics.New(nil)

	params := &mobileanalytics.PutEventsInput{
		ClientContext: aws.String("String"), // Required
		Events: []*mobileanalytics.Event{ // Required
			{ // Required
				EventType: aws.String("String50Chars"),    // Required
				Timestamp: aws.String("ISO8601Timestamp"), // Required
				Attributes: map[string]*string{
					"Key": aws.String("String0to1000Chars"), // Required
					// More values...
				},
				Metrics: map[string]*float64{
					"Key": aws.Float64(1.0), // Required
					// More values...
				},
				Session: &mobileanalytics.Session{
					Duration:       aws.Int64(1),
					Id:             aws.String("String50Chars"),
					StartTimestamp: aws.String("ISO8601Timestamp"),
					StopTimestamp:  aws.String("ISO8601Timestamp"),
				},
				Version: aws.String("String10Chars"),
			},
			// More values...
		},
		ClientContextEncoding: aws.String("String"),
	}
	resp, err := svc.PutEvents(params)

	if err != nil {
		// Print the error, cast err to awserr.Error to get the Code and
		// Message from an error.
		fmt.Println(err.Error())
		return
	}

	// Pretty-print the response data.
	fmt.Println(resp)
}
Output:

func (*MobileAnalytics) PutEventsRequest

func (c *MobileAnalytics) PutEventsRequest(input *PutEventsInput) (req *request.Request, output *PutEventsOutput)

PutEventsRequest generates a request for the PutEvents operation.

type PutEventsInput

type PutEventsInput struct {
	// The client context including the client ID, app title, app version and package
	// name.
	ClientContext *string `location:"header" locationName:"x-amz-Client-Context" type:"string" required:"true"`

	// The encoding used for the client context.
	ClientContextEncoding *string `location:"header" locationName:"x-amz-Client-Context-Encoding" type:"string"`

	// An array of Event JSON objects
	Events []*Event `locationName:"events" type:"list" required:"true"`
	// contains filtered or unexported fields
}

A container for the data needed for a PutEvent operation

func (PutEventsInput) GoString added in v0.6.5

func (s PutEventsInput) GoString() string

GoString returns the string representation

func (PutEventsInput) String added in v0.6.5

func (s PutEventsInput) String() string

String returns the string representation

type PutEventsOutput

type PutEventsOutput struct {
	// contains filtered or unexported fields
}

func (PutEventsOutput) GoString added in v0.6.5

func (s PutEventsOutput) GoString() string

GoString returns the string representation

func (PutEventsOutput) String added in v0.6.5

func (s PutEventsOutput) String() string

String returns the string representation

type Session

type Session struct {
	// The duration of the session.
	Duration *int64 `locationName:"duration" type:"long"`

	// A unique identifier for the session
	Id *string `locationName:"id" min:"1" type:"string"`

	// The time the event started in ISO 8601 standard date time format. For example,
	// 2014-06-30T19:07:47.885Z
	StartTimestamp *string `locationName:"startTimestamp" type:"string"`

	// The time the event terminated in ISO 8601 standard date time format. For
	// example, 2014-06-30T19:07:47.885Z
	StopTimestamp *string `locationName:"stopTimestamp" type:"string"`
	// contains filtered or unexported fields
}

Describes the session. Session information is required on ALL events.

func (Session) GoString added in v0.6.5

func (s Session) GoString() string

GoString returns the string representation

func (Session) String added in v0.6.5

func (s Session) String() string

String returns the string representation

Directories

Path Synopsis
Package mobileanalyticsiface provides an interface for the Amazon Mobile Analytics.
Package mobileanalyticsiface provides an interface for the Amazon Mobile Analytics.

Jump to

Keyboard shortcuts

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