aha

package module
v0.1.0 Latest Latest
Warning

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

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

README

Go API client for Aha!

Go Report Card Docs License

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: 1.0.0
  • Package version: 1.0.0
  • Build package: io.swagger.codegen.languages.GoClientCodegen

Installation

$ go get github.com/grokify/go-aha

Usage

import(
	"github.com/grokify/go-aha/ahautil"
	au "github.com/grokify/oauth2util/aha"
)

func main() {
	client := au.NewClient(os.Getenv("AHA_ACCOUNT"), os.Getenv("AHA_API_KEY"))
	apis := ahautil.ClientAPIs{Client: client}
	api := apis.FeaturesApi()

	info, resp, err := api.FeaturesGet("", timeutil.TimeRFC3339Zero(), "", "", 1, 500)
}

See the examples directory for more.

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

See the examples.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIClient

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

func (*APIClient) CallAPI

func (c *APIClient) CallAPI(path string, method string,
	postBody interface{},
	headerParams map[string]string,
	queryParams url.Values,
	formParams map[string]string,
	fileName string,
	fileBytes []byte) (*resty.Response, error)

func (*APIClient) ParameterToString

func (c *APIClient) ParameterToString(obj interface{}, collectionFormat string) string

func (*APIClient) SelectHeaderAccept

func (c *APIClient) SelectHeaderAccept(accepts []string) string

func (*APIClient) SelectHeaderContentType

func (c *APIClient) SelectHeaderContentType(contentTypes []string) string

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 Configuration

type Configuration struct {
	Username      string            `json:"userName,omitempty"`
	Password      string            `json:"password,omitempty"`
	APIKeyPrefix  map[string]string `json:"APIKeyPrefix,omitempty"`
	APIKey        map[string]string `json:"APIKey,omitempty"`
	Debug         bool              `json:"debug,omitempty"`
	DebugFile     string            `json:"debugFile,omitempty"`
	OAuthToken    string            `json:"oAuthToken,omitempty"`
	BasePath      string            `json:"basePath,omitempty"`
	Host          string            `json:"host,omitempty"`
	Scheme        string            `json:"scheme,omitempty"`
	AccessToken   string            `json:"accessToken,omitempty"`
	DefaultHeader map[string]string `json:"defaultHeader,omitempty"`
	UserAgent     string            `json:"userAgent,omitempty"`
	APIClient     *APIClient
	Transport     http.RoundTripper
	Timeout       *time.Duration `json:"timeout,omitempty"`
}

func NewConfiguration

func NewConfiguration() *Configuration

func (*Configuration) AddDefaultHeader

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

func (*Configuration) GetAPIKeyWithPrefix

func (c *Configuration) GetAPIKeyWithPrefix(APIKeyIdentifier string) string

func (*Configuration) GetBasicAuthEncodedString

func (c *Configuration) GetBasicAuthEncodedString() 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 timeutil.RFC3339YMDTime `json:"start_date,omitempty"`

	// Due date in YYYY-MM-DD format.
	DueDate timeutil.RFC3339YMDTime `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 FeatureRequest

type FeatureRequest struct {
	ReleaseId string `json:"release_id"`

	Name string `json:"name"`

	WorkflowKind string `json:"workflow_kind"`

	WorkflowStatus WorkflowStatus `json:"workflow_status"`

	Description string `json:"description,omitempty"`

	CreatedBy User `json:"created_by,omitempty"`

	AssignedToUser User `json:"assigned_to_user,omitempty"`

	Tags string `json:"tags,omitempty"`

	OriginalEstimateText string `json:"original_estimate_text,omitempty"`

	RemainingEstimateText string `json:"remaining_estimate_text,omitempty"`

	OriginalEstimate string `json:"original_estimate,omitempty"`

	RemainingEstimate string `json:"remaining_estimate,omitempty"`

	StartDate time.Time `json:"start_date,omitempty"`

	DueDate time.Time `json:"due_date,omitempty"`

	ReleasePhase string `json:"release_phase,omitempty"`

	Initiative string `json:"initiative,omitempty"`

	MasterFeature string `json:"master_feature,omitempty"`
}

type FeatureResponse

type FeatureResponse struct {
	Feature Feature `json:"feature,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 timeutil.RFC3339YMDTime `json:"start_date,omitempty"`

	// Date that work is due to be completed on the feature in format YYYY-MM-DD.
	DueDate timeutil.RFC3339YMDTime `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 Features

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

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

type FeaturesApi

type FeaturesApi struct {
	Configuration *Configuration
}

func NewFeaturesApi

func NewFeaturesApi() *FeaturesApi

func NewFeaturesApiWithBasePath

func NewFeaturesApiWithBasePath(basePath string) *FeaturesApi

func (FeaturesApi) FeaturesFeatureIdGet

func (a FeaturesApi) FeaturesFeatureIdGet(featureId string) (*FeatureWrap, *APIResponse, error)

*

*
* Get a specific feature
*
* @param featureId Numeric ID, or key of the feature to be retrieved
* @return *FeatureWrap

func (FeaturesApi) FeaturesFeatureIdPut

func (a FeaturesApi) FeaturesFeatureIdPut(featureId string, feature FeatureUpdate) (*FeatureWrap, *APIResponse, error)

*

  • Update a feature's custom fields with tag-like value
  • Update a feature's custom fields with tag-like value *
  • @param featureId Numeric ID, or key of the feature to be retrieved
  • @param feature Feature properties to update
  • @return *FeatureWrap

func (FeaturesApi) FeaturesGet

func (a FeaturesApi) FeaturesGet(q string, updatedSince time.Time, tag string, assignedToUser string, page int32, perPage int32) (*FeaturesResponse, *APIResponse, error)

*

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

func (FeaturesApi) ReleasesReleaseIdFeaturesGet

func (a FeaturesApi) ReleasesReleaseIdFeaturesGet(releaseId string) (*FeaturesResponse, *APIResponse, error)

*

  • Get all features for a release
  • Get all features for a release *
  • @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 Initiative

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

	Name string `json:"name,omitempty"`

	Url string `json:"url,omitempty"`

	Resource string `json:"resource,omitempty"`

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

type InlineResponse200

type InlineResponse200 struct {
	Features []InlineResponse200Features `json:"features,omitempty"`

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

type InlineResponse2001

type InlineResponse2001 struct {
	Feature InlineResponse200Features `json:"feature,omitempty"`
}

type InlineResponse2002

type InlineResponse2002 struct {
	Releases []InlineResponse2002Releases `json:"releases,omitempty"`

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

type InlineResponse2002Releases

type InlineResponse2002Releases 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 timeutil.RFC3339YMDTime `json:"start_date,omitempty"`

	// Release date in YYYY-MM-DD format.
	ReleaseDate timeutil.RFC3339YMDTime `json:"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 InlineResponse200Features

type InlineResponse200Features 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"`

	Initiative InlineResponse200Initiative `json:"initiative,omitempty"`

	DueDate         timeutil.RFC3339YMDTime `json:"due_date,omitempty"`
	StartDate       timeutil.RFC3339YMDTime `json:"start_date,omitempty"`
	ReferencePrefix string                  `json:"referece_prefix,omitempty"`
}

func (*InlineResponse200Features) Inflate

func (f *InlineResponse200Features) Inflate()

type InlineResponse200Initiative

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

	Name string `json:"name,omitempty"`

	Url string `json:"url,omitempty"`

	Resource string `json:"resource,omitempty"`

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

type InlineResponse200Pagination

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

	TotalPages int64 `json:"total_pages,omitempty"`

	CurrentPage int64 `json:"current_page,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 timeutil.RFC3339YMDTime `json:"start_date,omitempty"`

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

	// External release date in YYYY-MM-DD format.
	ExternalReleaseDate timeutil.RFC3339YMDTime `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 ReleaseResponse

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

type ReleaseUpdate

type ReleaseUpdate struct {

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

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

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

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

	// The external release date for this feature in format YYYY-MM-DD
	ExternalReleaseDate timeutil.RFC3339YMDTime `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 Releases

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

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

type ReleasesApi

type ReleasesApi struct {
	Configuration *Configuration
}

func NewReleasesApi

func NewReleasesApi() *ReleasesApi

func NewReleasesApiWithBasePath

func NewReleasesApiWithBasePath(basePath string) *ReleasesApi

func (ReleasesApi) ProductsProductIdReleasesGet

func (a ReleasesApi) ProductsProductIdReleasesGet(productId string) (*ReleasesResponse, *APIResponse, error)

*

  • Releases API
  • Create a release *
  • @param productId The id of the company being queried
  • @return *ReleasesResponse

func (ReleasesApi) ProductsProductIdReleasesReleaseIdPut

func (a ReleasesApi) ProductsProductIdReleasesReleaseIdPut(productId string, releaseId string, release ReleaseUpdateWrap) (*ReleaseWrap, *APIResponse, error)

*

  • Update a release
  • Update a release *
  • @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 (ReleasesApi) ReleasesReleaseIdGet

func (a ReleasesApi) ReleasesReleaseIdGet(releaseId string) (*ReleaseWrap, *APIResponse, error)

*

*
* Get a specific release
*
* @param releaseId Numeric ID, or key of the release to be retrieved
* @return *ReleaseWrap

type ReleasesFeaturesApi

type ReleasesFeaturesApi struct {
	Configuration *Configuration
}

func NewReleasesFeaturesApi

func NewReleasesFeaturesApi() *ReleasesFeaturesApi

func NewReleasesFeaturesApiWithBasePath

func NewReleasesFeaturesApiWithBasePath(basePath string) *ReleasesFeaturesApi

func (ReleasesFeaturesApi) ReleasesReleaseIdFeaturesGet

func (a ReleasesFeaturesApi) ReleasesReleaseIdFeaturesGet(releaseId string) (*FeaturesResponse, *APIResponse, error)

*

  • Get all features for a release
  • Get all features for a release *
  • @param releaseId Numeric ID, or key of the release to retrieve features for
  • @return *FeaturesResponse

type ReleasesResponse

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

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

type ReleasesreleaseIdfeaturesCreatedBy

type ReleasesreleaseIdfeaturesCreatedBy struct {
	Email string `json:"email,omitempty"`
}

type ReleasesreleaseIdfeaturesWorkflowStatus

type ReleasesreleaseIdfeaturesWorkflowStatus struct {
	Name string `json:"name,omitempty"`
}

type User

type User struct {
	Email string `json:"email,omitempty"`
}

type WorkflowStatus

type WorkflowStatus struct {
	Name string `json:"name,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