aha

package module
v2.3.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2017 License: MIT Imports: 19 Imported by: 0

README

Go API client for Aha!

Articles that matter on social publishing platform

Overview

This API client was generated by the swagger-codegen project. By using the swagger-spec from a remote server, you can easily generate an API client.

  • API version: 2.3.0
  • Package version: 2.3.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

Put the package under your project folder and add the following in import:

    "github.com/grokify/go-aha"

Documentation for API Endpoints

All URIs are relative to https://secure.aha.io/api/v1

Class Method HTTP request Description
FeaturesApi FeaturesFeatureIdGet Get /features/{feature_id}
FeaturesApi FeaturesFeatureIdPut Put /features/{feature_id} Update a feature's custom fields with tag-like value
FeaturesApi FeaturesGet Get /features Get all features
FeaturesApi ReleasesReleaseIdFeaturesGet Get /releases/{release_id}/features Get all features for a release
ReleasesApi ProductsProductIdReleasesGet Get /products/{product_id}/releases Releases API
ReleasesApi ProductsProductIdReleasesReleaseIdPut Put /products/{product_id}/releases/{release_id} Update a release
ReleasesApi ReleasesReleaseIdGet Get /releases/{release_id}

Documentation For Models

Documentation For Authorization

Use *http.Client from github.com/grokify/oauth2util/aha.NewClient()

See examples.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ContextOAuth2 takes a oauth2.TokenSource as authentication for the request.
	ContextOAuth2 = contextKey("token")

	// ContextBasicAuth takes BasicAuth as authentication for the request.
	ContextBasicAuth = contextKey("basic")

	// ContextAccessToken takes a string oauth2 access token as authentication for the request.
	ContextAccessToken = contextKey("accesstoken")

	// ContextAPIKey takes an APIKey as authentication for the request
	ContextAPIKey = contextKey("apikey")
)

Functions

func CacheExpires

func CacheExpires(r *http.Response) time.Time

CacheExpires helper function to determine remaining time before repeating a request.

Types

type APIClient

type APIClient struct {

	// API Services
	FeaturesApi *FeaturesApiService
	ReleasesApi *ReleasesApiService
	// contains filtered or unexported fields
}

APIClient manages communication with the Aha.io API API v1.0.0 In most cases there should be only one, shared, APIClient.

func NewAPIClient

func NewAPIClient(cfg *Configuration) *APIClient

NewAPIClient creates a new API client. Requires a userAgent string describing your application. optionally a custom http.Client to allow for advanced features such as caching.

func (*APIClient) ChangeBasePath

func (c *APIClient) ChangeBasePath(path string)

Change base path to allow switching to mocks

type APIKey

type APIKey struct {
	Key    string
	Prefix string
}

APIKey provides API key based authentication to a request passed via context using ContextAPIKey

type APIResponse

type APIResponse struct {
	*http.Response `json:"-"`
	Message        string `json:"message,omitempty"`
	// Operation is the name of the swagger operation.
	Operation string `json:"operation,omitempty"`
	// RequestURL is the request URL. This value is always available, even if the
	// embedded *http.Response is nil.
	RequestURL string `json:"url,omitempty"`
	// Method is the HTTP method used for the request.  This value is always
	// available, even if the embedded *http.Response is nil.
	Method string `json:"method,omitempty"`
	// Payload holds the contents of the response body (which may be nil or empty).
	// This is provided here as the raw response.Body() reader will have already
	// been drained.
	Payload []byte `json:"-"`
}

func NewAPIResponse

func NewAPIResponse(r *http.Response) *APIResponse

func NewAPIResponseWithError

func NewAPIResponseWithError(errorMessage string) *APIResponse

type BasicAuth

type BasicAuth struct {
	UserName string `json:"userName,omitempty"`
	Password string `json:"password,omitempty"`
}

BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth

type Configuration

type Configuration struct {
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	HTTPClient    *http.Client
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

func (c *Configuration) AddDefaultHeader(key string, value string)

type Feature

type Feature struct {
	Id string `json:"id,omitempty"`

	ReferenceNum string `json:"reference_num,omitempty"`

	Name string `json:"name,omitempty"`

	CreatedAt time.Time `json:"created_at,omitempty"`

	// Start date in YYYY-MM-DD format.
	StartDate string `json:"start_date,omitempty"`

	// Due date in YYYY-MM-DD format.
	DueDate string `json:"due_date,omitempty"`

	Url string `json:"url,omitempty"`

	Resource string `json:"resource,omitempty"`

	Tags []string `json:"tags,omitempty"`
}

type FeatureMeta

type FeatureMeta struct {
	Id string `json:"id,omitempty"`

	ReferenceNum string `json:"reference_num,omitempty"`

	Name string `json:"name,omitempty"`

	CreatedAt time.Time `json:"created_at,omitempty"`

	Url string `json:"url,omitempty"`

	Resource string `json:"resource,omitempty"`
}

type FeatureUpdate

type FeatureUpdate struct {

	// Name of the feature
	Name string `json:"name,omitempty"`

	// Description of the feature and it can include HTML formatting.
	Description string `json:"description,omitempty"`

	// Email address of user that created the feature.
	CreatedBy string `json:"created_by,omitempty"`

	// Email address of user that is assigned the feature.
	AssignedToUser string `json:"assigned_to_user,omitempty"`

	// Tags can be automatically assigned to the new feature. If more than one tag is used then tags should be separated by commas
	Tags string `json:"tags,omitempty"`

	// Set the original estimated effort in a text format, you can use d, h, min (or 'p' for points) to indicate the units to use.
	OriginalEstimateText string `json:"original_estimate_text,omitempty"`

	//  Set the remaining estimated effort in a text format, you can use d, h, min (or 'p' for points) to indicate the units to use.
	RemainingEstimateText string `json:"remaining_estimate_text,omitempty"`

	// Date that work will start on the feature in format YYYY-MM-DD.
	StartDate string `json:"start_date,omitempty"`

	// Date that work is due to be completed on the feature in format YYYY-MM-DD.
	DueDate string `json:"due_date,omitempty"`

	// Name or id of release phase which the feature belongs to.
	ReleasePhase string `json:"release_phase,omitempty"`

	// Name or id of initiative which the feature belongs to.
	Initiative string `json:"initiative,omitempty"`

	// Name or id of master feature which the feature belongs to.
	MasterFeature string `json:"master_feature,omitempty"`
}

type FeatureWrap

type FeatureWrap struct {
	Feature *Feature `json:"feature,omitempty"`
}

type FeaturesApiService

type FeaturesApiService service

func (*FeaturesApiService) FeaturesFeatureIdGet

func (a *FeaturesApiService) FeaturesFeatureIdGet(ctx context.Context, featureId string) (FeatureWrap, *http.Response, error)
FeaturesApiService

Get a specific feature * @param ctx context.Context for authentication, logging, tracing, etc. @param featureId Numeric ID, or key of the feature to be retrieved @return FeatureWrap

func (*FeaturesApiService) FeaturesFeatureIdPut

func (a *FeaturesApiService) FeaturesFeatureIdPut(ctx context.Context, featureId string, feature FeatureUpdate) (FeatureWrap, *http.Response, error)
FeaturesApiService Update a feature's custom fields with tag-like value

Update a feature's custom fields with tag-like value * @param ctx context.Context for authentication, logging, tracing, etc. @param featureId Numeric ID, or key of the feature to be retrieved @param feature Feature properties to update @return FeatureWrap

func (*FeaturesApiService) FeaturesGet

func (a *FeaturesApiService) FeaturesGet(ctx context.Context, localVarOptionals map[string]interface{}) (FeaturesResponse, *http.Response, error)
FeaturesApiService Get all features

Get all features * @param ctx context.Context for authentication, logging, tracing, etc. @param optional (nil or map[string]interface{}) with one or more of:

@param "q" (string) Sub-string to match against feature name or ID
@param "updatedSince" (time.Time) UTC timestamp (in ISO8601 format) that the updated_at field must be larger than.
@param "tag" (string) A string tag value.
@param "assignedToUser" (string) The ID or email address of user to return assigned features for.
@param "page" (int32) A specific page of results.
@param "perPage" (int32) Number of results per page.

@return FeaturesResponse

func (*FeaturesApiService) ReleasesReleaseIdFeaturesGet

func (a *FeaturesApiService) ReleasesReleaseIdFeaturesGet(ctx context.Context, releaseId string) (FeaturesResponse, *http.Response, error)
FeaturesApiService Get all features for a release

Get all features for a release * @param ctx context.Context for authentication, logging, tracing, etc. @param releaseId Numeric ID, or key of the release to retrieve features for @return FeaturesResponse

type FeaturesResponse

type FeaturesResponse struct {
	Features []FeatureMeta `json:"features,omitempty"`

	Pagination *Pagination `json:"pagination,omitempty"`
}

type Pagination

type Pagination struct {
	TotalRecords int64 `json:"total_records,omitempty"`

	TotalPages int64 `json:"total_pages,omitempty"`

	CurrentPage int64 `json:"current_page,omitempty"`
}

type Release

type Release struct {

	// A unique identifier for the release.
	Id string `json:"id,omitempty"`

	// Release referenence number.
	ReferenceNum string `json:"reference_num,omitempty"`

	// Release name.
	Name string `json:"name,omitempty"`

	// Start date in YYYY-MM-DD format.
	StartDate string `json:"start_date,omitempty"`

	// Release date in YYYY-MM-DD format.
	ReleaseDate string `json:"release_date,omitempty"`

	// External release date in YYYY-MM-DD format.
	ExternalReleaseDate string `json:"external_release_date,omitempty"`

	Released bool `json:"released,omitempty"`

	ParkingLot bool `json:"parking_lot,omitempty"`

	// Web URL for release.
	Url string `json:"url,omitempty"`

	// API URL for release.
	Resource string `json:"resource,omitempty"`
}

type ReleaseUpdate

type ReleaseUpdate struct {

	// Release name.
	Name string `json:"name,omitempty"`

	// Start date in YYYY-MM-DD format.
	StartDate string `json:"start_date,omitempty"`

	// Release date in YYYY-MM-DD format.
	ReleaseDate string `json:"release_date,omitempty"`

	// Date Development started in format YYYY-MM-DD
	DevelopmentStartedOn string `json:"development_started_on,omitempty"`

	// The external release date for this feature in format YYYY-MM-DD
	ExternalReleaseDate string `json:"external_release_date,omitempty"`

	ParkingLot bool `json:"parking_lot,omitempty"`
}

type ReleaseUpdateWrap

type ReleaseUpdateWrap struct {
	Release *ReleaseUpdate `json:"release,omitempty"`
}

type ReleaseWrap

type ReleaseWrap struct {
	Release *Release `json:"release,omitempty"`
}

type ReleasesApiService

type ReleasesApiService service

func (*ReleasesApiService) ProductsProductIdReleasesGet

func (a *ReleasesApiService) ProductsProductIdReleasesGet(ctx context.Context, productId string) (ReleasesResponse, *http.Response, error)

ReleasesApiService Releases API Create a release * @param ctx context.Context for authentication, logging, tracing, etc. @param productId The id of the company being queried @return ReleasesResponse

func (*ReleasesApiService) ProductsProductIdReleasesReleaseIdPut

func (a *ReleasesApiService) ProductsProductIdReleasesReleaseIdPut(ctx context.Context, productId string, releaseId string, release ReleaseUpdateWrap) (ReleaseWrap, *http.Response, error)

ReleasesApiService Update a release Update a release * @param ctx context.Context for authentication, logging, tracing, etc. @param productId Numeric ID, or key of the product to create the release in @param releaseId Numeric ID, or key of the release to be updated @param release Release properties to update @return ReleaseWrap

func (*ReleasesApiService) ReleasesReleaseIdGet

func (a *ReleasesApiService) ReleasesReleaseIdGet(ctx context.Context, releaseId string) (ReleaseWrap, *http.Response, error)

ReleasesApiService Get a specific release * @param ctx context.Context for authentication, logging, tracing, etc. @param releaseId Numeric ID, or key of the release to be retrieved @return ReleaseWrap

type ReleasesResponse

type ReleasesResponse struct {
	Releases []Release `json:"releases,omitempty"`

	Pagination *Pagination `json:"pagination,omitempty"`
}

Directories

Path Synopsis
examples
elasticsearch command
get_features command
update_release command

Jump to

Keyboard shortcuts

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