├── api ├── responses │ └── _index.yaml ├── schema │ ├── frames.yaml │ ├── login_request_user.yaml │ ├── metadata.yaml │ ├── login_response.yaml │ ├── frame_environment.yaml │ ├── feed_item.yaml │ ├── contributor_tokens.yaml │ ├── login_request.yaml │ ├── user.yaml │ ├── impression.yaml │ ├── _index.yaml │ ├── current_user.yaml │ ├── asset.yaml │ └── frame.yaml ├── resources │ ├── frames.yaml │ └── login.yaml └── aura.yaml ├── auraframes ├── .openapi-generator │ ├── VERSION │ └── FILES ├── .travis.yml ├── .gitignore ├── .openapi-generator-ignore ├── response.go ├── docs │ ├── Features.md │ ├── Frames.md │ ├── LoginResponseResult.md │ ├── FramesApi.md │ ├── LoginRequestUser.md │ ├── LoginResponse.md │ ├── AuthApi.md │ ├── FeedItem.md │ ├── Metadata.md │ ├── LoginRequest.md │ ├── FrameEnvironment.md │ ├── ContributorTokens.md │ ├── User.md │ └── Impression.md ├── git_push.sh ├── model_frames.go ├── model_login_response_result.go ├── model_login_request_user.go ├── model_login_response.go ├── README.md ├── api_frames.go ├── api_auth.go ├── model_feed_item.go ├── model_login_request.go ├── model_metadata.go ├── utils.go ├── model_frame_environment.go ├── configuration.go ├── model_contributor_tokens.go ├── model_user.go ├── model_impression.go └── client.go ├── package.json ├── Makefile ├── .gitignore ├── openapitools.json └── README.md /api/responses/_index.yaml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /auraframes/.openapi-generator/VERSION: -------------------------------------------------------------------------------- 1 | 6.0.0 -------------------------------------------------------------------------------- /auraframes/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | install: 4 | - go get -d -v . 5 | 6 | script: 7 | - go build -v ./ 8 | 9 | -------------------------------------------------------------------------------- /api/schema/frames.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | frames: 4 | type: array 5 | items: 6 | $ref: '../schema/frame.yaml' -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "@apidevtools/swagger-cli": "^4.0", 4 | "@openapitools/openapi-generator-cli": "^2.5" 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /api/schema/login_request_user.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | required: 3 | - email 4 | - password 5 | properties: 6 | email: 7 | type: string 8 | password: 9 | type: string -------------------------------------------------------------------------------- /api/schema/metadata.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | attribution: 4 | type: string 5 | date: 6 | type: string 7 | location: 8 | type: string 9 | pair_reasons: 10 | type: string -------------------------------------------------------------------------------- /api/schema/login_response.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | error: 4 | type: boolean 5 | result: 6 | type: object 7 | properties: 8 | current_user: 9 | $ref: '../schema/current_user.yaml' -------------------------------------------------------------------------------- /api/schema/frame_environment.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | id: 4 | type: string 5 | frame_id: 6 | type: string 7 | last_online_at: 8 | type: string 9 | created_at: 10 | type: string 11 | updated_at: 12 | type: string -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all 2 | all: 3 | npx --yes @apidevtools/swagger-cli bundle api/aura.yaml --outfile bundle.yaml --type yaml 4 | npx --yes @openapitools/openapi-generator-cli generate --generator-key auraframes-client 5 | 6 | .PHONY: clean 7 | clean: 8 | rm -fR go 9 | -------------------------------------------------------------------------------- /api/schema/feed_item.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | assets: 4 | type: array 5 | items: 6 | $ref: '../schema/asset.yaml' 7 | metadata: 8 | $ref: '../schema/metadata.yaml' 9 | message: 10 | type: string 11 | stick_for: 12 | type: string -------------------------------------------------------------------------------- /api/schema/contributor_tokens.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | email: 4 | type: string 5 | phone_number: 6 | type: string 7 | expires_at: 8 | type: string 9 | created_at: 10 | type: string 11 | updated_at: 12 | type: string 13 | frame_id: 14 | type: string 15 | contributor_name: 16 | type: string -------------------------------------------------------------------------------- /auraframes/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /api/schema/login_request.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | required: 3 | - app_identifier 4 | - client_device_id 5 | - identifier_for_vendor 6 | - locale 7 | - user 8 | properties: 9 | app_identifier: 10 | type: string 11 | client_device_id: 12 | type: string 13 | identifier_for_vendor: 14 | type: string 15 | locale: 16 | type: string 17 | user: 18 | $ref: '../schema/login_request_user.yaml' -------------------------------------------------------------------------------- /api/resources/frames.yaml: -------------------------------------------------------------------------------- 1 | get: 2 | tags: 3 | - frames 4 | summary: Access to an Aura Frame 5 | operationId: getFrames 6 | security: 7 | - sessionId: [] 8 | parameters: 9 | - name: include_shared_albums 10 | in: query 11 | schema: 12 | type: string 13 | responses: 14 | 200: 15 | description: Success 16 | content: 17 | application/json: 18 | schema: 19 | $ref: '../schema/frames.yaml' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | 26 | bundle.yaml 27 | 28 | package-lock.json 29 | .idea 30 | vendor 31 | node_modules 32 | 33 | # local dev 34 | main.go 35 | go.sum 36 | go.mod -------------------------------------------------------------------------------- /api/schema/user.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | id: 4 | type: string 5 | short_id: 6 | type: string 7 | test_account: 8 | type: string 9 | created_at: 10 | type: string 11 | updated_at: 12 | type: string 13 | latest_app_version: 14 | type: string 15 | name: 16 | type: string 17 | email: 18 | type: string 19 | attribution_id: 20 | type: string 21 | attribution_string: 22 | type: string 23 | show_push_prompt: 24 | type: boolean 25 | avatar_file_name: 26 | type: string -------------------------------------------------------------------------------- /api/schema/impression.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | last_viewed_or_created_at: 4 | type: string 5 | view_count: 6 | type: string 7 | gesture_direction: 8 | type: string 9 | created_at: 10 | type: string 11 | live_photo_on_transition: 12 | type: string 13 | viewed_at: 14 | type: string 15 | id: 16 | type: string 17 | last_viewed_at: 18 | type: string 19 | last_shown_with_asset_id: 20 | type: string 21 | frame_id: 22 | type: string 23 | asset_id: 24 | type: string 25 | asset: 26 | $ref: '../schema/asset.yaml' -------------------------------------------------------------------------------- /openapitools.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json", 3 | "spaces": 2, 4 | "generator-cli": { 5 | "version": "6.0.0", 6 | "generators": { 7 | "auraframes-client": { 8 | "generatorName": "go", 9 | "inputSpec": "bundle.yaml", 10 | "output": "auraframes", 11 | "gitUserId": "bp1222", 12 | "gitRepoId": "auraframes-api", 13 | "additionalProperties": { 14 | "packageName": "auraframes", 15 | "generateInterfaces": true, 16 | "isGoSubmodule": true 17 | } 18 | } 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /api/schema/_index.yaml: -------------------------------------------------------------------------------- 1 | Asset: 2 | $ref: './asset.yaml' 3 | ContributorTokens: 4 | $ref: './contributor_tokens.yaml' 5 | CurrentUser: 6 | $ref: './current_user.yaml' 7 | FeedItem: 8 | $ref: './feed_item.yaml' 9 | FrameEnvironment: 10 | $ref: './frame_environment.yaml' 11 | Frame: 12 | $ref: './frame.yaml' 13 | Frames: 14 | $ref: './frames.yaml' 15 | Impression: 16 | $ref: './impression.yaml' 17 | LoginRequestUser: 18 | $ref: './login_request_user.yaml' 19 | LoginRequest: 20 | $ref: './login_request.yaml' 21 | LoginResponse: 22 | $ref: './login_response.yaml' 23 | Metadata: 24 | $ref: './metadata.yaml' 25 | User: 26 | $ref: './user.yaml' -------------------------------------------------------------------------------- /api/resources/login.yaml: -------------------------------------------------------------------------------- 1 | post: 2 | tags: 3 | - auth 4 | summary: Login to Aura Frames 5 | operationId: login 6 | parameters: 7 | - name: x-device-identifier 8 | in: header 9 | schema: 10 | type: string 11 | - name: x-client-device-id 12 | in: header 13 | schema: 14 | type: string 15 | requestBody: 16 | description: Login Information 17 | content: 18 | application/json: 19 | schema: 20 | $ref: '../schema/login_request.yaml' 21 | responses: 22 | 200: 23 | description: Success 24 | content: 25 | application/json: 26 | schema: 27 | $ref: '../schema/login_response.yaml' -------------------------------------------------------------------------------- /api/aura.yaml: -------------------------------------------------------------------------------- 1 | openapi: 3.0.1 2 | info: 3 | description: Reverse Engineered API for Aura Frames 4 | version: 0.0.1 5 | title: Aura Frame API - Unofficial 6 | contact: 7 | email: dave@mudsite.com 8 | license: 9 | name: Apache 2.0 10 | url: http://www.apache.org/licenses/LICENSE-2.0.html 11 | 12 | tags: 13 | - name: auth 14 | description: Authentication 15 | - name: frames 16 | description: Frames 17 | 18 | paths: 19 | /login.json: 20 | $ref: './resources/login.yaml' 21 | /frames.json: 22 | $ref: './resources/frames.yaml' 23 | 24 | servers: 25 | - url: https://api.pushd.com/v5 26 | 27 | components: 28 | schemas: 29 | $ref: './schema/_index.yaml' 30 | securitySchemes: 31 | TokenAuth: 32 | type: apiKey 33 | in: header 34 | name: x-token-auth 35 | UserId: 36 | type: apiKey 37 | in: header 38 | name: x-user-id 39 | 40 | security: 41 | - TokenAuth: [] 42 | UserId: [] -------------------------------------------------------------------------------- /auraframes/.openapi-generator/FILES: -------------------------------------------------------------------------------- 1 | .gitignore 2 | .travis.yml 3 | README.md 4 | api/openapi.yaml 5 | api_auth.go 6 | api_frames.go 7 | client.go 8 | configuration.go 9 | docs/Asset.md 10 | docs/AuthApi.md 11 | docs/ContributorTokens.md 12 | docs/CurrentUser.md 13 | docs/FeedItem.md 14 | docs/Frame.md 15 | docs/FrameEnvironment.md 16 | docs/Frames.md 17 | docs/FramesApi.md 18 | docs/Impression.md 19 | docs/LoginRequest.md 20 | docs/LoginRequestUser.md 21 | docs/LoginResponse.md 22 | docs/LoginResponseResult.md 23 | docs/Metadata.md 24 | docs/User.md 25 | git_push.sh 26 | go.mod 27 | go.sum 28 | model_asset.go 29 | model_contributor_tokens.go 30 | model_current_user.go 31 | model_feed_item.go 32 | model_frame.go 33 | model_frame_environment.go 34 | model_frames.go 35 | model_impression.go 36 | model_login_request.go 37 | model_login_request_user.go 38 | model_login_response.go 39 | model_login_response_result.go 40 | model_metadata.go 41 | model_user.go 42 | response.go 43 | utils.go 44 | -------------------------------------------------------------------------------- /auraframes/.openapi-generator-ignore: -------------------------------------------------------------------------------- 1 | # OpenAPI Generator Ignore 2 | # Generated by openapi-generator https://github.com/openapitools/openapi-generator 3 | 4 | # Use this file to prevent files from being overwritten by the generator. 5 | # The patterns follow closely to .gitignore or .dockerignore. 6 | 7 | # As an example, the C# client generator defines ApiClient.cs. 8 | # You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line: 9 | #ApiClient.cs 10 | 11 | # You can match any string of characters against a directory, file or extension with a single asterisk (*): 12 | #foo/*/qux 13 | # The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux 14 | 15 | # You can recursively match patterns against a directory, file or extension with a double asterisk (**): 16 | #foo/**/qux 17 | # This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux 18 | 19 | # You can also negate patterns with an exclamation (!). 20 | # For example, you can ignore all files in a docs folder with the file extension .md: 21 | #docs/*.md 22 | # Then explicitly reverse the ignore rule for a single file: 23 | #!docs/README.md 24 | -------------------------------------------------------------------------------- /auraframes/response.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "net/http" 16 | ) 17 | 18 | // APIResponse stores the API response returned by the server. 19 | type APIResponse struct { 20 | *http.Response `json:"-"` 21 | Message string `json:"message,omitempty"` 22 | // Operation is the name of the OpenAPI operation. 23 | Operation string `json:"operation,omitempty"` 24 | // RequestURL is the request URL. This value is always available, even if the 25 | // embedded *http.Response is nil. 26 | RequestURL string `json:"url,omitempty"` 27 | // Method is the HTTP method used for the request. This value is always 28 | // available, even if the embedded *http.Response is nil. 29 | Method string `json:"method,omitempty"` 30 | // Payload holds the contents of the response body (which may be nil or empty). 31 | // This is provided here as the raw response.Body() reader will have already 32 | // been drained. 33 | Payload []byte `json:"-"` 34 | } 35 | 36 | // NewAPIResponse returns a new APIResponse object. 37 | func NewAPIResponse(r *http.Response) *APIResponse { 38 | 39 | response := &APIResponse{Response: r} 40 | return response 41 | } 42 | 43 | // NewAPIResponseWithError returns a new APIResponse object with the provided error message. 44 | func NewAPIResponseWithError(errorMessage string) *APIResponse { 45 | 46 | response := &APIResponse{Message: errorMessage} 47 | return response 48 | } 49 | -------------------------------------------------------------------------------- /auraframes/docs/Features.md: -------------------------------------------------------------------------------- 1 | # Features 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Id** | Pointer to **string** | | [optional] 8 | 9 | ## Methods 10 | 11 | ### NewFeatures 12 | 13 | `func NewFeatures() *Features` 14 | 15 | NewFeatures instantiates a new Features object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewFeaturesWithDefaults 21 | 22 | `func NewFeaturesWithDefaults() *Features` 23 | 24 | NewFeaturesWithDefaults instantiates a new Features object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetId 29 | 30 | `func (o *Features) GetId() string` 31 | 32 | GetId returns the Id field if non-nil, zero value otherwise. 33 | 34 | ### GetIdOk 35 | 36 | `func (o *Features) GetIdOk() (*string, bool)` 37 | 38 | GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetId 42 | 43 | `func (o *Features) SetId(v string)` 44 | 45 | SetId sets Id field to given value. 46 | 47 | ### HasId 48 | 49 | `func (o *Features) HasId() bool` 50 | 51 | HasId returns a boolean if a field has been set. 52 | 53 | 54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 55 | 56 | 57 | -------------------------------------------------------------------------------- /auraframes/docs/Frames.md: -------------------------------------------------------------------------------- 1 | # Frames 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Frames** | Pointer to [**[]Frame**](Frame.md) | | [optional] 8 | 9 | ## Methods 10 | 11 | ### NewFrames 12 | 13 | `func NewFrames() *Frames` 14 | 15 | NewFrames instantiates a new Frames object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewFramesWithDefaults 21 | 22 | `func NewFramesWithDefaults() *Frames` 23 | 24 | NewFramesWithDefaults instantiates a new Frames object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetFrames 29 | 30 | `func (o *Frames) GetFrames() []Frame` 31 | 32 | GetFrames returns the Frames field if non-nil, zero value otherwise. 33 | 34 | ### GetFramesOk 35 | 36 | `func (o *Frames) GetFramesOk() (*[]Frame, bool)` 37 | 38 | GetFramesOk returns a tuple with the Frames field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetFrames 42 | 43 | `func (o *Frames) SetFrames(v []Frame)` 44 | 45 | SetFrames sets Frames field to given value. 46 | 47 | ### HasFrames 48 | 49 | `func (o *Frames) HasFrames() bool` 50 | 51 | HasFrames returns a boolean if a field has been set. 52 | 53 | 54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 55 | 56 | 57 | -------------------------------------------------------------------------------- /api/schema/current_user.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | admin_account: 4 | type: string 5 | attribution_id: 6 | type: string 7 | attribution_string: 8 | type: string 9 | auth_token: 10 | type: string 11 | auto_upload_off: 12 | type: boolean 13 | avatar_file_name: 14 | type: string 15 | billing_info: 16 | type: string 17 | charity_subscriptions_launched: 18 | type: boolean 19 | confirmed_email: 20 | type: string 21 | created_at: 22 | type: string 23 | current_source_id: 24 | type: string 25 | eligible_for_app_review_prompt: 26 | type: boolean 27 | email: 28 | type: string 29 | features: 30 | type: array 31 | items: 32 | type: string 33 | google_photos_disabled: 34 | type: string 35 | has_access_to_new_google_photos: 36 | type: boolean 37 | has_frame: 38 | type: boolean 39 | id: 40 | type: string 41 | latest_app_version: 42 | type: string 43 | live_photos_launched: 44 | type: boolean 45 | locale: 46 | type: string 47 | name: 48 | type: string 49 | print_subscriptions_launched: 50 | type: boolean 51 | recurly_account_code: 52 | type: string 53 | short_id: 54 | type: string 55 | show_push_prompt: 56 | type: boolean 57 | smart_albums_off: 58 | type: boolean 59 | smart_suggestions_off: 60 | type: boolean 61 | subscriptions_launched: 62 | type: boolean 63 | test_account: 64 | type: string 65 | thanks_launched: 66 | type: boolean 67 | tooltip_add_photos_seen: 68 | type: boolean 69 | tooltip_added_photos_seen: 70 | type: boolean 71 | tooltip_gestures_seen: 72 | type: boolean 73 | tooltip_inbox_seen: 74 | type: boolean 75 | tooltip_manage_frames_seen: 76 | type: boolean 77 | tooltip_settings_seen: 78 | type: boolean 79 | unconfirmed_email: 80 | type: string 81 | updated_at: 82 | type: string 83 | verbose_logging_enabled: 84 | type: boolean 85 | warn_smart_albums_deprecated: 86 | type: boolean -------------------------------------------------------------------------------- /auraframes/docs/LoginResponseResult.md: -------------------------------------------------------------------------------- 1 | # LoginResponseResult 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **CurrentUser** | Pointer to [**CurrentUser**](CurrentUser.md) | | [optional] 8 | 9 | ## Methods 10 | 11 | ### NewLoginResponseResult 12 | 13 | `func NewLoginResponseResult() *LoginResponseResult` 14 | 15 | NewLoginResponseResult instantiates a new LoginResponseResult object 16 | This constructor will assign default values to properties that have it defined, 17 | and makes sure properties required by API are set, but the set of arguments 18 | will change when the set of required properties is changed 19 | 20 | ### NewLoginResponseResultWithDefaults 21 | 22 | `func NewLoginResponseResultWithDefaults() *LoginResponseResult` 23 | 24 | NewLoginResponseResultWithDefaults instantiates a new LoginResponseResult object 25 | This constructor will only assign default values to properties that have it defined, 26 | but it doesn't guarantee that properties required by API are set 27 | 28 | ### GetCurrentUser 29 | 30 | `func (o *LoginResponseResult) GetCurrentUser() CurrentUser` 31 | 32 | GetCurrentUser returns the CurrentUser field if non-nil, zero value otherwise. 33 | 34 | ### GetCurrentUserOk 35 | 36 | `func (o *LoginResponseResult) GetCurrentUserOk() (*CurrentUser, bool)` 37 | 38 | GetCurrentUserOk returns a tuple with the CurrentUser field if it's non-nil, zero value otherwise 39 | and a boolean to check if the value has been set. 40 | 41 | ### SetCurrentUser 42 | 43 | `func (o *LoginResponseResult) SetCurrentUser(v CurrentUser)` 44 | 45 | SetCurrentUser sets CurrentUser field to given value. 46 | 47 | ### HasCurrentUser 48 | 49 | `func (o *LoginResponseResult) HasCurrentUser() bool` 50 | 51 | HasCurrentUser returns a boolean if a field has been set. 52 | 53 | 54 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 55 | 56 | 57 | -------------------------------------------------------------------------------- /auraframes/git_push.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/ 3 | # 4 | # Usage example: /bin/sh ./git_push.sh wing328 openapi-petstore-perl "minor update" "gitlab.com" 5 | 6 | git_user_id=$1 7 | git_repo_id=$2 8 | release_note=$3 9 | git_host=$4 10 | 11 | if [ "$git_host" = "" ]; then 12 | git_host="github.com" 13 | echo "[INFO] No command line input provided. Set \$git_host to $git_host" 14 | fi 15 | 16 | if [ "$git_user_id" = "" ]; then 17 | git_user_id="bp1222" 18 | echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id" 19 | fi 20 | 21 | if [ "$git_repo_id" = "" ]; then 22 | git_repo_id="auraframes-api" 23 | echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id" 24 | fi 25 | 26 | if [ "$release_note" = "" ]; then 27 | release_note="Minor update" 28 | echo "[INFO] No command line input provided. Set \$release_note to $release_note" 29 | fi 30 | 31 | # Initialize the local directory as a Git repository 32 | git init 33 | 34 | # Adds the files in the local repository and stages them for commit. 35 | git add . 36 | 37 | # Commits the tracked changes and prepares them to be pushed to a remote repository. 38 | git commit -m "$release_note" 39 | 40 | # Sets the new remote 41 | git_remote=$(git remote) 42 | if [ "$git_remote" = "" ]; then # git remote not defined 43 | 44 | if [ "$GIT_TOKEN" = "" ]; then 45 | echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment." 46 | git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git 47 | else 48 | git remote add origin https://${git_user_id}:"${GIT_TOKEN}"@${git_host}/${git_user_id}/${git_repo_id}.git 49 | fi 50 | 51 | fi 52 | 53 | git pull origin master 54 | 55 | # Pushes (Forces) the changes in the local repository up to the remote repository 56 | echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git" 57 | git push origin master 2>&1 | grep -v 'To https' 58 | -------------------------------------------------------------------------------- /auraframes/docs/FramesApi.md: -------------------------------------------------------------------------------- 1 | # \FramesApi 2 | 3 | All URIs are relative to *https://api.pushd.com/v5* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**GetFrames**](FramesApi.md#GetFrames) | **Get** /frames.json | Access to an Aura Frame 8 | 9 | 10 | 11 | ## GetFrames 12 | 13 | > Frames GetFrames(ctx).IncludeSharedAlbums(includeSharedAlbums).Execute() 14 | 15 | Access to an Aura Frame 16 | 17 | ### Example 18 | 19 | ```go 20 | package main 21 | 22 | import ( 23 | "context" 24 | "fmt" 25 | "os" 26 | openapiclient "./openapi" 27 | ) 28 | 29 | func main() { 30 | includeSharedAlbums := "includeSharedAlbums_example" // string | (optional) 31 | 32 | configuration := openapiclient.NewConfiguration() 33 | apiClient := openapiclient.NewAPIClient(configuration) 34 | resp, r, err := apiClient.FramesApi.GetFrames(context.Background()).IncludeSharedAlbums(includeSharedAlbums).Execute() 35 | if err != nil { 36 | fmt.Fprintf(os.Stderr, "Error when calling `FramesApi.GetFrames``: %v\n", err) 37 | fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 38 | } 39 | // response from `GetFrames`: Frames 40 | fmt.Fprintf(os.Stdout, "Response from `FramesApi.GetFrames`: %v\n", resp) 41 | } 42 | ``` 43 | 44 | ### Path Parameters 45 | 46 | 47 | 48 | ### Other Parameters 49 | 50 | Other parameters are passed through a pointer to a apiGetFramesRequest struct via the builder pattern 51 | 52 | 53 | Name | Type | Description | Notes 54 | ------------- | ------------- | ------------- | ------------- 55 | **includeSharedAlbums** | **string** | | 56 | 57 | ### Return type 58 | 59 | [**Frames**](Frames.md) 60 | 61 | ### Authorization 62 | 63 | [TokenAuth](../README.md#TokenAuth), [UserId](../README.md#UserId) 64 | 65 | ### HTTP request headers 66 | 67 | - **Content-Type**: Not defined 68 | - **Accept**: application/json 69 | 70 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 71 | [[Back to Model list]](../README.md#documentation-for-models) 72 | [[Back to README]](../README.md) 73 | 74 | -------------------------------------------------------------------------------- /auraframes/docs/LoginRequestUser.md: -------------------------------------------------------------------------------- 1 | # LoginRequestUser 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Email** | **string** | | 8 | **Password** | **string** | | 9 | 10 | ## Methods 11 | 12 | ### NewLoginRequestUser 13 | 14 | `func NewLoginRequestUser(email string, password string, ) *LoginRequestUser` 15 | 16 | NewLoginRequestUser instantiates a new LoginRequestUser object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewLoginRequestUserWithDefaults 22 | 23 | `func NewLoginRequestUserWithDefaults() *LoginRequestUser` 24 | 25 | NewLoginRequestUserWithDefaults instantiates a new LoginRequestUser object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetEmail 30 | 31 | `func (o *LoginRequestUser) GetEmail() string` 32 | 33 | GetEmail returns the Email field if non-nil, zero value otherwise. 34 | 35 | ### GetEmailOk 36 | 37 | `func (o *LoginRequestUser) GetEmailOk() (*string, bool)` 38 | 39 | GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetEmail 43 | 44 | `func (o *LoginRequestUser) SetEmail(v string)` 45 | 46 | SetEmail sets Email field to given value. 47 | 48 | 49 | ### GetPassword 50 | 51 | `func (o *LoginRequestUser) GetPassword() string` 52 | 53 | GetPassword returns the Password field if non-nil, zero value otherwise. 54 | 55 | ### GetPasswordOk 56 | 57 | `func (o *LoginRequestUser) GetPasswordOk() (*string, bool)` 58 | 59 | GetPasswordOk returns a tuple with the Password field if it's non-nil, zero value otherwise 60 | and a boolean to check if the value has been set. 61 | 62 | ### SetPassword 63 | 64 | `func (o *LoginRequestUser) SetPassword(v string)` 65 | 66 | SetPassword sets Password field to given value. 67 | 68 | 69 | 70 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 71 | 72 | 73 | -------------------------------------------------------------------------------- /auraframes/docs/LoginResponse.md: -------------------------------------------------------------------------------- 1 | # LoginResponse 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Error** | Pointer to **bool** | | [optional] 8 | **Result** | Pointer to [**LoginResponseResult**](LoginResponseResult.md) | | [optional] 9 | 10 | ## Methods 11 | 12 | ### NewLoginResponse 13 | 14 | `func NewLoginResponse() *LoginResponse` 15 | 16 | NewLoginResponse instantiates a new LoginResponse object 17 | This constructor will assign default values to properties that have it defined, 18 | and makes sure properties required by API are set, but the set of arguments 19 | will change when the set of required properties is changed 20 | 21 | ### NewLoginResponseWithDefaults 22 | 23 | `func NewLoginResponseWithDefaults() *LoginResponse` 24 | 25 | NewLoginResponseWithDefaults instantiates a new LoginResponse object 26 | This constructor will only assign default values to properties that have it defined, 27 | but it doesn't guarantee that properties required by API are set 28 | 29 | ### GetError 30 | 31 | `func (o *LoginResponse) GetError() bool` 32 | 33 | GetError returns the Error field if non-nil, zero value otherwise. 34 | 35 | ### GetErrorOk 36 | 37 | `func (o *LoginResponse) GetErrorOk() (*bool, bool)` 38 | 39 | GetErrorOk returns a tuple with the Error field if it's non-nil, zero value otherwise 40 | and a boolean to check if the value has been set. 41 | 42 | ### SetError 43 | 44 | `func (o *LoginResponse) SetError(v bool)` 45 | 46 | SetError sets Error field to given value. 47 | 48 | ### HasError 49 | 50 | `func (o *LoginResponse) HasError() bool` 51 | 52 | HasError returns a boolean if a field has been set. 53 | 54 | ### GetResult 55 | 56 | `func (o *LoginResponse) GetResult() LoginResponseResult` 57 | 58 | GetResult returns the Result field if non-nil, zero value otherwise. 59 | 60 | ### GetResultOk 61 | 62 | `func (o *LoginResponse) GetResultOk() (*LoginResponseResult, bool)` 63 | 64 | GetResultOk returns a tuple with the Result field if it's non-nil, zero value otherwise 65 | and a boolean to check if the value has been set. 66 | 67 | ### SetResult 68 | 69 | `func (o *LoginResponse) SetResult(v LoginResponseResult)` 70 | 71 | SetResult sets Result field to given value. 72 | 73 | ### HasResult 74 | 75 | `func (o *LoginResponse) HasResult() bool` 76 | 77 | HasResult returns a boolean if a field has been set. 78 | 79 | 80 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 81 | 82 | 83 | -------------------------------------------------------------------------------- /auraframes/docs/AuthApi.md: -------------------------------------------------------------------------------- 1 | # \AuthApi 2 | 3 | All URIs are relative to *https://api.pushd.com/v5* 4 | 5 | Method | HTTP request | Description 6 | ------------- | ------------- | ------------- 7 | [**Login**](AuthApi.md#Login) | **Post** /login.json | Login to Aura Frames 8 | 9 | 10 | 11 | ## Login 12 | 13 | > LoginResponse Login(ctx).XDeviceIdentifier(xDeviceIdentifier).XClientDeviceId(xClientDeviceId).LoginRequest(loginRequest).Execute() 14 | 15 | Login to Aura Frames 16 | 17 | ### Example 18 | 19 | ```go 20 | package main 21 | 22 | import ( 23 | "context" 24 | "fmt" 25 | "os" 26 | openapiclient "./openapi" 27 | ) 28 | 29 | func main() { 30 | xDeviceIdentifier := "xDeviceIdentifier_example" // string | (optional) 31 | xClientDeviceId := "xClientDeviceId_example" // string | (optional) 32 | loginRequest := *openapiclient.NewLoginRequest("AppIdentifier_example", "ClientDeviceId_example", "IdentifierForVendor_example", "Locale_example", *openapiclient.NewLoginRequestUser("Email_example", "Password_example")) // LoginRequest | Login Information (optional) 33 | 34 | configuration := openapiclient.NewConfiguration() 35 | apiClient := openapiclient.NewAPIClient(configuration) 36 | resp, r, err := apiClient.AuthApi.Login(context.Background()).XDeviceIdentifier(xDeviceIdentifier).XClientDeviceId(xClientDeviceId).LoginRequest(loginRequest).Execute() 37 | if err != nil { 38 | fmt.Fprintf(os.Stderr, "Error when calling `AuthApi.Login``: %v\n", err) 39 | fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r) 40 | } 41 | // response from `Login`: LoginResponse 42 | fmt.Fprintf(os.Stdout, "Response from `AuthApi.Login`: %v\n", resp) 43 | } 44 | ``` 45 | 46 | ### Path Parameters 47 | 48 | 49 | 50 | ### Other Parameters 51 | 52 | Other parameters are passed through a pointer to a apiLoginRequest struct via the builder pattern 53 | 54 | 55 | Name | Type | Description | Notes 56 | ------------- | ------------- | ------------- | ------------- 57 | **xDeviceIdentifier** | **string** | | 58 | **xClientDeviceId** | **string** | | 59 | **loginRequest** | [**LoginRequest**](LoginRequest.md) | Login Information | 60 | 61 | ### Return type 62 | 63 | [**LoginResponse**](LoginResponse.md) 64 | 65 | ### Authorization 66 | 67 | [TokenAuth](../README.md#TokenAuth), [UserId](../README.md#UserId) 68 | 69 | ### HTTP request headers 70 | 71 | - **Content-Type**: application/json 72 | - **Accept**: application/json 73 | 74 | [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) 75 | [[Back to Model list]](../README.md#documentation-for-models) 76 | [[Back to README]](../README.md) 77 | 78 | -------------------------------------------------------------------------------- /api/schema/asset.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | id: 4 | type: string 5 | user_id: 6 | type: string 7 | thumbnail_url: 8 | type: string 9 | portrait_url: 10 | type: string 11 | landscape_url: 12 | type: string 13 | landscape_16_10_url: 14 | type: string 15 | portrait_4_5_url: 16 | type: string 17 | video_url: 18 | type: string 19 | landscape_rect: 20 | type: string 21 | portrait_rect: 22 | type: string 23 | user_landscape_rect: 24 | type: string 25 | user_portrait_rect: 26 | type: string 27 | auto_landscape_16_10_rect: 28 | type: string 29 | user_landscape_16_10_rect: 30 | type: string 31 | auto_portrait_4_5_rect: 32 | type: string 33 | user_portrait_4_5_rect: 34 | type: string 35 | exif_orientation: 36 | type: string 37 | handled_at: 38 | type: string 39 | uploaded_at: 40 | type: string 41 | good_resolution: 42 | type: bool 43 | source_id: 44 | type: string 45 | duplicate_of_id: 46 | type: string 47 | rotation_cw: 48 | type: string 49 | location_name: 50 | type: string 51 | md5_hash: 52 | type: string 53 | is_subscription: 54 | type: boolean 55 | glaciered_at: 56 | type: string 57 | unglacierable: 58 | type: bool 59 | duration: 60 | type: string 61 | live_photo_off: 62 | type: string 63 | local_identifier: 64 | type: string 65 | created_at_on_client: 66 | type: string 67 | selected: 68 | type: bool 69 | file_name: 70 | type: string 71 | raw_file_name: 72 | type: string 73 | video_file_name: 74 | type: string 75 | width: 76 | type: string 77 | height: 78 | type: string 79 | taken_at: 80 | type: string 81 | horizontal_accuracy: 82 | type: string 83 | favorite: 84 | type: bool 85 | orientation: 86 | type: string 87 | hdr: 88 | type: bool 89 | panorama: 90 | type: bool 91 | is_live: 92 | type: string 93 | burst_id: 94 | type: string 95 | burst_selection_types: 96 | type: string 97 | represents_burst: 98 | type: string 99 | data_uti: 100 | type: string 101 | original_file_name: 102 | type: string 103 | upload_priority: 104 | type: string 105 | ios_media_subtypes: 106 | type: string 107 | taken_at_user_override_at: 108 | type: string 109 | duration_unclipped: 110 | type: string 111 | video_clip_start: 112 | type: string 113 | video_clip_excludes_audio: 114 | type: string 115 | video_clipped_by_user_at: 116 | type: string 117 | location: 118 | type: string 119 | user: 120 | $ref: '../schema/user.yaml' -------------------------------------------------------------------------------- /auraframes/model_frames.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // Frames struct for Frames 19 | type Frames struct { 20 | Frames []Frame `json:"frames,omitempty"` 21 | } 22 | 23 | // NewFrames instantiates a new Frames object 24 | // This constructor will assign default values to properties that have it defined, 25 | // and makes sure properties required by API are set, but the set of arguments 26 | // will change when the set of required properties is changed 27 | func NewFrames() *Frames { 28 | this := Frames{} 29 | return &this 30 | } 31 | 32 | // NewFramesWithDefaults instantiates a new Frames object 33 | // This constructor will only assign default values to properties that have it defined, 34 | // but it doesn't guarantee that properties required by API are set 35 | func NewFramesWithDefaults() *Frames { 36 | this := Frames{} 37 | return &this 38 | } 39 | 40 | // GetFrames returns the Frames field value if set, zero value otherwise. 41 | func (o *Frames) GetFrames() []Frame { 42 | if o == nil || o.Frames == nil { 43 | var ret []Frame 44 | return ret 45 | } 46 | return o.Frames 47 | } 48 | 49 | // GetFramesOk returns a tuple with the Frames field value if set, nil otherwise 50 | // and a boolean to check if the value has been set. 51 | func (o *Frames) GetFramesOk() ([]Frame, bool) { 52 | if o == nil || o.Frames == nil { 53 | return nil, false 54 | } 55 | return o.Frames, true 56 | } 57 | 58 | // HasFrames returns a boolean if a field has been set. 59 | func (o *Frames) HasFrames() bool { 60 | if o != nil && o.Frames != nil { 61 | return true 62 | } 63 | 64 | return false 65 | } 66 | 67 | // SetFrames gets a reference to the given []Frame and assigns it to the Frames field. 68 | func (o *Frames) SetFrames(v []Frame) { 69 | o.Frames = v 70 | } 71 | 72 | func (o Frames) MarshalJSON() ([]byte, error) { 73 | toSerialize := map[string]interface{}{} 74 | if o.Frames != nil { 75 | toSerialize["frames"] = o.Frames 76 | } 77 | return json.Marshal(toSerialize) 78 | } 79 | 80 | type NullableFrames struct { 81 | value *Frames 82 | isSet bool 83 | } 84 | 85 | func (v NullableFrames) Get() *Frames { 86 | return v.value 87 | } 88 | 89 | func (v *NullableFrames) Set(val *Frames) { 90 | v.value = val 91 | v.isSet = true 92 | } 93 | 94 | func (v NullableFrames) IsSet() bool { 95 | return v.isSet 96 | } 97 | 98 | func (v *NullableFrames) Unset() { 99 | v.value = nil 100 | v.isSet = false 101 | } 102 | 103 | func NewNullableFrames(val *Frames) *NullableFrames { 104 | return &NullableFrames{value: val, isSet: true} 105 | } 106 | 107 | func (v NullableFrames) MarshalJSON() ([]byte, error) { 108 | return json.Marshal(v.value) 109 | } 110 | 111 | func (v *NullableFrames) UnmarshalJSON(src []byte) error { 112 | v.isSet = true 113 | return json.Unmarshal(src, &v.value) 114 | } 115 | 116 | 117 | -------------------------------------------------------------------------------- /api/schema/frame.yaml: -------------------------------------------------------------------------------- 1 | type: object 2 | properties: 3 | id: 4 | type: string 5 | name: 6 | type: string 7 | user_id: 8 | type: string 9 | software_version: 10 | type: string 11 | build_version: 12 | type: string 13 | hw_android_version: 14 | type: string 15 | created_at: 16 | type: string 17 | updated_at: 18 | type: string 19 | handled_at: 20 | type: string 21 | deleted_at: 22 | type: string 23 | updated_at_on_client: 24 | type: string 25 | last_impression_at: 26 | type: string 27 | orientation: 28 | type: string 29 | auto_brightness: 30 | type: boolean 31 | min_brightness: 32 | type: string 33 | max_brightness: 34 | type: string 35 | brightness: 36 | type: string 37 | sense_motion: 38 | type: boolean 39 | default_speed: 40 | type: string 41 | slideshow_interval: 42 | type: string 43 | slideshow_auto: 44 | type: boolean 45 | digits: 46 | type: string 47 | contributor_tokens: 48 | type: array 49 | items: 50 | $ref: '../schema/contributor_tokens.yaml' 51 | hw_serial: 52 | type: string 53 | matting_color: 54 | type: string 55 | trim_color: 56 | type: string 57 | is_handling: 58 | type: boolean 59 | calibrations_last_modified_at: 60 | type: string 61 | gestures_on: 62 | type: boolean 63 | portrait_pairing_off: 64 | type: string 65 | live_photos_on: 66 | type: boolean 67 | auto_processed_playlist_ids: 68 | type: array 69 | items: 70 | type: string 71 | time_zone: 72 | type: string 73 | wifi_network: 74 | type: string 75 | cold_boot_at: 76 | type: string 77 | is_charity_water_frame: 78 | type: boolean 79 | num_assets: 80 | type: string 81 | thanks_on: 82 | type: boolean 83 | frame_queue_url: 84 | type: string 85 | client_queue_url: 86 | type: string 87 | scheduled_display_sleep: 88 | type: boolean 89 | scheduled_display_on_at: 90 | type: string 91 | scheduled_display_off_at: 92 | type: string 93 | forced_wifi_state: 94 | type: string 95 | forced_wifi_recipient_email: 96 | type: string 97 | is_analog_frame: 98 | type: boolean 99 | control_type: 100 | type: string 101 | display_aspect_ratio: 102 | type: string 103 | has_claimable_gift: 104 | type: boolean 105 | gift_billing_hint: 106 | type: string 107 | locale: 108 | type: string 109 | frame_type: 110 | type: string 111 | description: 112 | type: string 113 | representative_asset_id: 114 | type: string 115 | sort_mode: 116 | type: string 117 | email_address: 118 | type: string 119 | features: 120 | type: array 121 | items: 122 | type: string 123 | volume: 124 | type: string 125 | user: 126 | $ref: '../schema/user.yaml' 127 | playlists: 128 | type: array 129 | items: 130 | type: string 131 | last_feed_item: 132 | $ref: '../schema/feed_item.yaml' 133 | last_impression: 134 | $ref: '../schema/impression.yaml' 135 | recent_assets: 136 | type: array 137 | items: 138 | $ref: '../schema/asset.yaml' 139 | contributors: 140 | type: array 141 | items: 142 | $ref: '../schema/user.yaml' 143 | frame_environment: 144 | $ref: '../schema/frame_environment.yaml' 145 | current_print_set: 146 | type: string 147 | first_print_set: 148 | type: string 149 | child_albums: 150 | type: array 151 | items: 152 | type: string 153 | smart_adds: 154 | type: array 155 | items: 156 | type: string -------------------------------------------------------------------------------- /auraframes/model_login_response_result.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // LoginResponseResult struct for LoginResponseResult 19 | type LoginResponseResult struct { 20 | CurrentUser *CurrentUser `json:"current_user,omitempty"` 21 | } 22 | 23 | // NewLoginResponseResult instantiates a new LoginResponseResult object 24 | // This constructor will assign default values to properties that have it defined, 25 | // and makes sure properties required by API are set, but the set of arguments 26 | // will change when the set of required properties is changed 27 | func NewLoginResponseResult() *LoginResponseResult { 28 | this := LoginResponseResult{} 29 | return &this 30 | } 31 | 32 | // NewLoginResponseResultWithDefaults instantiates a new LoginResponseResult object 33 | // This constructor will only assign default values to properties that have it defined, 34 | // but it doesn't guarantee that properties required by API are set 35 | func NewLoginResponseResultWithDefaults() *LoginResponseResult { 36 | this := LoginResponseResult{} 37 | return &this 38 | } 39 | 40 | // GetCurrentUser returns the CurrentUser field value if set, zero value otherwise. 41 | func (o *LoginResponseResult) GetCurrentUser() CurrentUser { 42 | if o == nil || o.CurrentUser == nil { 43 | var ret CurrentUser 44 | return ret 45 | } 46 | return *o.CurrentUser 47 | } 48 | 49 | // GetCurrentUserOk returns a tuple with the CurrentUser field value if set, nil otherwise 50 | // and a boolean to check if the value has been set. 51 | func (o *LoginResponseResult) GetCurrentUserOk() (*CurrentUser, bool) { 52 | if o == nil || o.CurrentUser == nil { 53 | return nil, false 54 | } 55 | return o.CurrentUser, true 56 | } 57 | 58 | // HasCurrentUser returns a boolean if a field has been set. 59 | func (o *LoginResponseResult) HasCurrentUser() bool { 60 | if o != nil && o.CurrentUser != nil { 61 | return true 62 | } 63 | 64 | return false 65 | } 66 | 67 | // SetCurrentUser gets a reference to the given CurrentUser and assigns it to the CurrentUser field. 68 | func (o *LoginResponseResult) SetCurrentUser(v CurrentUser) { 69 | o.CurrentUser = &v 70 | } 71 | 72 | func (o LoginResponseResult) MarshalJSON() ([]byte, error) { 73 | toSerialize := map[string]interface{}{} 74 | if o.CurrentUser != nil { 75 | toSerialize["current_user"] = o.CurrentUser 76 | } 77 | return json.Marshal(toSerialize) 78 | } 79 | 80 | type NullableLoginResponseResult struct { 81 | value *LoginResponseResult 82 | isSet bool 83 | } 84 | 85 | func (v NullableLoginResponseResult) Get() *LoginResponseResult { 86 | return v.value 87 | } 88 | 89 | func (v *NullableLoginResponseResult) Set(val *LoginResponseResult) { 90 | v.value = val 91 | v.isSet = true 92 | } 93 | 94 | func (v NullableLoginResponseResult) IsSet() bool { 95 | return v.isSet 96 | } 97 | 98 | func (v *NullableLoginResponseResult) Unset() { 99 | v.value = nil 100 | v.isSet = false 101 | } 102 | 103 | func NewNullableLoginResponseResult(val *LoginResponseResult) *NullableLoginResponseResult { 104 | return &NullableLoginResponseResult{value: val, isSet: true} 105 | } 106 | 107 | func (v NullableLoginResponseResult) MarshalJSON() ([]byte, error) { 108 | return json.Marshal(v.value) 109 | } 110 | 111 | func (v *NullableLoginResponseResult) UnmarshalJSON(src []byte) error { 112 | v.isSet = true 113 | return json.Unmarshal(src, &v.value) 114 | } 115 | 116 | 117 | -------------------------------------------------------------------------------- /auraframes/model_login_request_user.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // LoginRequestUser struct for LoginRequestUser 19 | type LoginRequestUser struct { 20 | Email string `json:"email"` 21 | Password string `json:"password"` 22 | } 23 | 24 | // NewLoginRequestUser instantiates a new LoginRequestUser object 25 | // This constructor will assign default values to properties that have it defined, 26 | // and makes sure properties required by API are set, but the set of arguments 27 | // will change when the set of required properties is changed 28 | func NewLoginRequestUser(email string, password string) *LoginRequestUser { 29 | this := LoginRequestUser{} 30 | this.Email = email 31 | this.Password = password 32 | return &this 33 | } 34 | 35 | // NewLoginRequestUserWithDefaults instantiates a new LoginRequestUser object 36 | // This constructor will only assign default values to properties that have it defined, 37 | // but it doesn't guarantee that properties required by API are set 38 | func NewLoginRequestUserWithDefaults() *LoginRequestUser { 39 | this := LoginRequestUser{} 40 | return &this 41 | } 42 | 43 | // GetEmail returns the Email field value 44 | func (o *LoginRequestUser) GetEmail() string { 45 | if o == nil { 46 | var ret string 47 | return ret 48 | } 49 | 50 | return o.Email 51 | } 52 | 53 | // GetEmailOk returns a tuple with the Email field value 54 | // and a boolean to check if the value has been set. 55 | func (o *LoginRequestUser) GetEmailOk() (*string, bool) { 56 | if o == nil { 57 | return nil, false 58 | } 59 | return &o.Email, true 60 | } 61 | 62 | // SetEmail sets field value 63 | func (o *LoginRequestUser) SetEmail(v string) { 64 | o.Email = v 65 | } 66 | 67 | // GetPassword returns the Password field value 68 | func (o *LoginRequestUser) GetPassword() string { 69 | if o == nil { 70 | var ret string 71 | return ret 72 | } 73 | 74 | return o.Password 75 | } 76 | 77 | // GetPasswordOk returns a tuple with the Password field value 78 | // and a boolean to check if the value has been set. 79 | func (o *LoginRequestUser) GetPasswordOk() (*string, bool) { 80 | if o == nil { 81 | return nil, false 82 | } 83 | return &o.Password, true 84 | } 85 | 86 | // SetPassword sets field value 87 | func (o *LoginRequestUser) SetPassword(v string) { 88 | o.Password = v 89 | } 90 | 91 | func (o LoginRequestUser) MarshalJSON() ([]byte, error) { 92 | toSerialize := map[string]interface{}{} 93 | if true { 94 | toSerialize["email"] = o.Email 95 | } 96 | if true { 97 | toSerialize["password"] = o.Password 98 | } 99 | return json.Marshal(toSerialize) 100 | } 101 | 102 | type NullableLoginRequestUser struct { 103 | value *LoginRequestUser 104 | isSet bool 105 | } 106 | 107 | func (v NullableLoginRequestUser) Get() *LoginRequestUser { 108 | return v.value 109 | } 110 | 111 | func (v *NullableLoginRequestUser) Set(val *LoginRequestUser) { 112 | v.value = val 113 | v.isSet = true 114 | } 115 | 116 | func (v NullableLoginRequestUser) IsSet() bool { 117 | return v.isSet 118 | } 119 | 120 | func (v *NullableLoginRequestUser) Unset() { 121 | v.value = nil 122 | v.isSet = false 123 | } 124 | 125 | func NewNullableLoginRequestUser(val *LoginRequestUser) *NullableLoginRequestUser { 126 | return &NullableLoginRequestUser{value: val, isSet: true} 127 | } 128 | 129 | func (v NullableLoginRequestUser) MarshalJSON() ([]byte, error) { 130 | return json.Marshal(v.value) 131 | } 132 | 133 | func (v *NullableLoginRequestUser) UnmarshalJSON(src []byte) error { 134 | v.isSet = true 135 | return json.Unmarshal(src, &v.value) 136 | } 137 | 138 | 139 | -------------------------------------------------------------------------------- /auraframes/docs/FeedItem.md: -------------------------------------------------------------------------------- 1 | # FeedItem 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Assets** | Pointer to [**[]Asset**](Asset.md) | | [optional] 8 | **Metadata** | Pointer to [**Metadata**](Metadata.md) | | [optional] 9 | **Message** | Pointer to **string** | | [optional] 10 | **StickFor** | Pointer to **string** | | [optional] 11 | 12 | ## Methods 13 | 14 | ### NewFeedItem 15 | 16 | `func NewFeedItem() *FeedItem` 17 | 18 | NewFeedItem instantiates a new FeedItem object 19 | This constructor will assign default values to properties that have it defined, 20 | and makes sure properties required by API are set, but the set of arguments 21 | will change when the set of required properties is changed 22 | 23 | ### NewFeedItemWithDefaults 24 | 25 | `func NewFeedItemWithDefaults() *FeedItem` 26 | 27 | NewFeedItemWithDefaults instantiates a new FeedItem object 28 | This constructor will only assign default values to properties that have it defined, 29 | but it doesn't guarantee that properties required by API are set 30 | 31 | ### GetAssets 32 | 33 | `func (o *FeedItem) GetAssets() []Asset` 34 | 35 | GetAssets returns the Assets field if non-nil, zero value otherwise. 36 | 37 | ### GetAssetsOk 38 | 39 | `func (o *FeedItem) GetAssetsOk() (*[]Asset, bool)` 40 | 41 | GetAssetsOk returns a tuple with the Assets field if it's non-nil, zero value otherwise 42 | and a boolean to check if the value has been set. 43 | 44 | ### SetAssets 45 | 46 | `func (o *FeedItem) SetAssets(v []Asset)` 47 | 48 | SetAssets sets Assets field to given value. 49 | 50 | ### HasAssets 51 | 52 | `func (o *FeedItem) HasAssets() bool` 53 | 54 | HasAssets returns a boolean if a field has been set. 55 | 56 | ### GetMetadata 57 | 58 | `func (o *FeedItem) GetMetadata() Metadata` 59 | 60 | GetMetadata returns the Metadata field if non-nil, zero value otherwise. 61 | 62 | ### GetMetadataOk 63 | 64 | `func (o *FeedItem) GetMetadataOk() (*Metadata, bool)` 65 | 66 | GetMetadataOk returns a tuple with the Metadata field if it's non-nil, zero value otherwise 67 | and a boolean to check if the value has been set. 68 | 69 | ### SetMetadata 70 | 71 | `func (o *FeedItem) SetMetadata(v Metadata)` 72 | 73 | SetMetadata sets Metadata field to given value. 74 | 75 | ### HasMetadata 76 | 77 | `func (o *FeedItem) HasMetadata() bool` 78 | 79 | HasMetadata returns a boolean if a field has been set. 80 | 81 | ### GetMessage 82 | 83 | `func (o *FeedItem) GetMessage() string` 84 | 85 | GetMessage returns the Message field if non-nil, zero value otherwise. 86 | 87 | ### GetMessageOk 88 | 89 | `func (o *FeedItem) GetMessageOk() (*string, bool)` 90 | 91 | GetMessageOk returns a tuple with the Message field if it's non-nil, zero value otherwise 92 | and a boolean to check if the value has been set. 93 | 94 | ### SetMessage 95 | 96 | `func (o *FeedItem) SetMessage(v string)` 97 | 98 | SetMessage sets Message field to given value. 99 | 100 | ### HasMessage 101 | 102 | `func (o *FeedItem) HasMessage() bool` 103 | 104 | HasMessage returns a boolean if a field has been set. 105 | 106 | ### GetStickFor 107 | 108 | `func (o *FeedItem) GetStickFor() string` 109 | 110 | GetStickFor returns the StickFor field if non-nil, zero value otherwise. 111 | 112 | ### GetStickForOk 113 | 114 | `func (o *FeedItem) GetStickForOk() (*string, bool)` 115 | 116 | GetStickForOk returns a tuple with the StickFor field if it's non-nil, zero value otherwise 117 | and a boolean to check if the value has been set. 118 | 119 | ### SetStickFor 120 | 121 | `func (o *FeedItem) SetStickFor(v string)` 122 | 123 | SetStickFor sets StickFor field to given value. 124 | 125 | ### HasStickFor 126 | 127 | `func (o *FeedItem) HasStickFor() bool` 128 | 129 | HasStickFor returns a boolean if a field has been set. 130 | 131 | 132 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 133 | 134 | 135 | -------------------------------------------------------------------------------- /auraframes/docs/Metadata.md: -------------------------------------------------------------------------------- 1 | # Metadata 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Attribution** | Pointer to **string** | | [optional] 8 | **Date** | Pointer to **string** | | [optional] 9 | **Location** | Pointer to **string** | | [optional] 10 | **PairReasons** | Pointer to **string** | | [optional] 11 | 12 | ## Methods 13 | 14 | ### NewMetadata 15 | 16 | `func NewMetadata() *Metadata` 17 | 18 | NewMetadata instantiates a new Metadata object 19 | This constructor will assign default values to properties that have it defined, 20 | and makes sure properties required by API are set, but the set of arguments 21 | will change when the set of required properties is changed 22 | 23 | ### NewMetadataWithDefaults 24 | 25 | `func NewMetadataWithDefaults() *Metadata` 26 | 27 | NewMetadataWithDefaults instantiates a new Metadata object 28 | This constructor will only assign default values to properties that have it defined, 29 | but it doesn't guarantee that properties required by API are set 30 | 31 | ### GetAttribution 32 | 33 | `func (o *Metadata) GetAttribution() string` 34 | 35 | GetAttribution returns the Attribution field if non-nil, zero value otherwise. 36 | 37 | ### GetAttributionOk 38 | 39 | `func (o *Metadata) GetAttributionOk() (*string, bool)` 40 | 41 | GetAttributionOk returns a tuple with the Attribution field if it's non-nil, zero value otherwise 42 | and a boolean to check if the value has been set. 43 | 44 | ### SetAttribution 45 | 46 | `func (o *Metadata) SetAttribution(v string)` 47 | 48 | SetAttribution sets Attribution field to given value. 49 | 50 | ### HasAttribution 51 | 52 | `func (o *Metadata) HasAttribution() bool` 53 | 54 | HasAttribution returns a boolean if a field has been set. 55 | 56 | ### GetDate 57 | 58 | `func (o *Metadata) GetDate() string` 59 | 60 | GetDate returns the Date field if non-nil, zero value otherwise. 61 | 62 | ### GetDateOk 63 | 64 | `func (o *Metadata) GetDateOk() (*string, bool)` 65 | 66 | GetDateOk returns a tuple with the Date field if it's non-nil, zero value otherwise 67 | and a boolean to check if the value has been set. 68 | 69 | ### SetDate 70 | 71 | `func (o *Metadata) SetDate(v string)` 72 | 73 | SetDate sets Date field to given value. 74 | 75 | ### HasDate 76 | 77 | `func (o *Metadata) HasDate() bool` 78 | 79 | HasDate returns a boolean if a field has been set. 80 | 81 | ### GetLocation 82 | 83 | `func (o *Metadata) GetLocation() string` 84 | 85 | GetLocation returns the Location field if non-nil, zero value otherwise. 86 | 87 | ### GetLocationOk 88 | 89 | `func (o *Metadata) GetLocationOk() (*string, bool)` 90 | 91 | GetLocationOk returns a tuple with the Location field if it's non-nil, zero value otherwise 92 | and a boolean to check if the value has been set. 93 | 94 | ### SetLocation 95 | 96 | `func (o *Metadata) SetLocation(v string)` 97 | 98 | SetLocation sets Location field to given value. 99 | 100 | ### HasLocation 101 | 102 | `func (o *Metadata) HasLocation() bool` 103 | 104 | HasLocation returns a boolean if a field has been set. 105 | 106 | ### GetPairReasons 107 | 108 | `func (o *Metadata) GetPairReasons() string` 109 | 110 | GetPairReasons returns the PairReasons field if non-nil, zero value otherwise. 111 | 112 | ### GetPairReasonsOk 113 | 114 | `func (o *Metadata) GetPairReasonsOk() (*string, bool)` 115 | 116 | GetPairReasonsOk returns a tuple with the PairReasons field if it's non-nil, zero value otherwise 117 | and a boolean to check if the value has been set. 118 | 119 | ### SetPairReasons 120 | 121 | `func (o *Metadata) SetPairReasons(v string)` 122 | 123 | SetPairReasons sets PairReasons field to given value. 124 | 125 | ### HasPairReasons 126 | 127 | `func (o *Metadata) HasPairReasons() bool` 128 | 129 | HasPairReasons returns a boolean if a field has been set. 130 | 131 | 132 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 133 | 134 | 135 | -------------------------------------------------------------------------------- /auraframes/model_login_response.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // LoginResponse struct for LoginResponse 19 | type LoginResponse struct { 20 | Error *bool `json:"error,omitempty"` 21 | Result *LoginResponseResult `json:"result,omitempty"` 22 | } 23 | 24 | // NewLoginResponse instantiates a new LoginResponse object 25 | // This constructor will assign default values to properties that have it defined, 26 | // and makes sure properties required by API are set, but the set of arguments 27 | // will change when the set of required properties is changed 28 | func NewLoginResponse() *LoginResponse { 29 | this := LoginResponse{} 30 | return &this 31 | } 32 | 33 | // NewLoginResponseWithDefaults instantiates a new LoginResponse object 34 | // This constructor will only assign default values to properties that have it defined, 35 | // but it doesn't guarantee that properties required by API are set 36 | func NewLoginResponseWithDefaults() *LoginResponse { 37 | this := LoginResponse{} 38 | return &this 39 | } 40 | 41 | // GetError returns the Error field value if set, zero value otherwise. 42 | func (o *LoginResponse) GetError() bool { 43 | if o == nil || o.Error == nil { 44 | var ret bool 45 | return ret 46 | } 47 | return *o.Error 48 | } 49 | 50 | // GetErrorOk returns a tuple with the Error field value if set, nil otherwise 51 | // and a boolean to check if the value has been set. 52 | func (o *LoginResponse) GetErrorOk() (*bool, bool) { 53 | if o == nil || o.Error == nil { 54 | return nil, false 55 | } 56 | return o.Error, true 57 | } 58 | 59 | // HasError returns a boolean if a field has been set. 60 | func (o *LoginResponse) HasError() bool { 61 | if o != nil && o.Error != nil { 62 | return true 63 | } 64 | 65 | return false 66 | } 67 | 68 | // SetError gets a reference to the given bool and assigns it to the Error field. 69 | func (o *LoginResponse) SetError(v bool) { 70 | o.Error = &v 71 | } 72 | 73 | // GetResult returns the Result field value if set, zero value otherwise. 74 | func (o *LoginResponse) GetResult() LoginResponseResult { 75 | if o == nil || o.Result == nil { 76 | var ret LoginResponseResult 77 | return ret 78 | } 79 | return *o.Result 80 | } 81 | 82 | // GetResultOk returns a tuple with the Result field value if set, nil otherwise 83 | // and a boolean to check if the value has been set. 84 | func (o *LoginResponse) GetResultOk() (*LoginResponseResult, bool) { 85 | if o == nil || o.Result == nil { 86 | return nil, false 87 | } 88 | return o.Result, true 89 | } 90 | 91 | // HasResult returns a boolean if a field has been set. 92 | func (o *LoginResponse) HasResult() bool { 93 | if o != nil && o.Result != nil { 94 | return true 95 | } 96 | 97 | return false 98 | } 99 | 100 | // SetResult gets a reference to the given LoginResponseResult and assigns it to the Result field. 101 | func (o *LoginResponse) SetResult(v LoginResponseResult) { 102 | o.Result = &v 103 | } 104 | 105 | func (o LoginResponse) MarshalJSON() ([]byte, error) { 106 | toSerialize := map[string]interface{}{} 107 | if o.Error != nil { 108 | toSerialize["error"] = o.Error 109 | } 110 | if o.Result != nil { 111 | toSerialize["result"] = o.Result 112 | } 113 | return json.Marshal(toSerialize) 114 | } 115 | 116 | type NullableLoginResponse struct { 117 | value *LoginResponse 118 | isSet bool 119 | } 120 | 121 | func (v NullableLoginResponse) Get() *LoginResponse { 122 | return v.value 123 | } 124 | 125 | func (v *NullableLoginResponse) Set(val *LoginResponse) { 126 | v.value = val 127 | v.isSet = true 128 | } 129 | 130 | func (v NullableLoginResponse) IsSet() bool { 131 | return v.isSet 132 | } 133 | 134 | func (v *NullableLoginResponse) Unset() { 135 | v.value = nil 136 | v.isSet = false 137 | } 138 | 139 | func NewNullableLoginResponse(val *LoginResponse) *NullableLoginResponse { 140 | return &NullableLoginResponse{value: val, isSet: true} 141 | } 142 | 143 | func (v NullableLoginResponse) MarshalJSON() ([]byte, error) { 144 | return json.Marshal(v.value) 145 | } 146 | 147 | func (v *NullableLoginResponse) UnmarshalJSON(src []byte) error { 148 | v.isSet = true 149 | return json.Unmarshal(src, &v.value) 150 | } 151 | 152 | 153 | -------------------------------------------------------------------------------- /auraframes/docs/LoginRequest.md: -------------------------------------------------------------------------------- 1 | # LoginRequest 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **AppIdentifier** | **string** | | 8 | **ClientDeviceId** | **string** | | 9 | **IdentifierForVendor** | **string** | | 10 | **Locale** | **string** | | 11 | **User** | [**LoginRequestUser**](LoginRequestUser.md) | | 12 | 13 | ## Methods 14 | 15 | ### NewLoginRequest 16 | 17 | `func NewLoginRequest(appIdentifier string, clientDeviceId string, identifierForVendor string, locale string, user LoginRequestUser, ) *LoginRequest` 18 | 19 | NewLoginRequest instantiates a new LoginRequest object 20 | This constructor will assign default values to properties that have it defined, 21 | and makes sure properties required by API are set, but the set of arguments 22 | will change when the set of required properties is changed 23 | 24 | ### NewLoginRequestWithDefaults 25 | 26 | `func NewLoginRequestWithDefaults() *LoginRequest` 27 | 28 | NewLoginRequestWithDefaults instantiates a new LoginRequest object 29 | This constructor will only assign default values to properties that have it defined, 30 | but it doesn't guarantee that properties required by API are set 31 | 32 | ### GetAppIdentifier 33 | 34 | `func (o *LoginRequest) GetAppIdentifier() string` 35 | 36 | GetAppIdentifier returns the AppIdentifier field if non-nil, zero value otherwise. 37 | 38 | ### GetAppIdentifierOk 39 | 40 | `func (o *LoginRequest) GetAppIdentifierOk() (*string, bool)` 41 | 42 | GetAppIdentifierOk returns a tuple with the AppIdentifier field if it's non-nil, zero value otherwise 43 | and a boolean to check if the value has been set. 44 | 45 | ### SetAppIdentifier 46 | 47 | `func (o *LoginRequest) SetAppIdentifier(v string)` 48 | 49 | SetAppIdentifier sets AppIdentifier field to given value. 50 | 51 | 52 | ### GetClientDeviceId 53 | 54 | `func (o *LoginRequest) GetClientDeviceId() string` 55 | 56 | GetClientDeviceId returns the ClientDeviceId field if non-nil, zero value otherwise. 57 | 58 | ### GetClientDeviceIdOk 59 | 60 | `func (o *LoginRequest) GetClientDeviceIdOk() (*string, bool)` 61 | 62 | GetClientDeviceIdOk returns a tuple with the ClientDeviceId field if it's non-nil, zero value otherwise 63 | and a boolean to check if the value has been set. 64 | 65 | ### SetClientDeviceId 66 | 67 | `func (o *LoginRequest) SetClientDeviceId(v string)` 68 | 69 | SetClientDeviceId sets ClientDeviceId field to given value. 70 | 71 | 72 | ### GetIdentifierForVendor 73 | 74 | `func (o *LoginRequest) GetIdentifierForVendor() string` 75 | 76 | GetIdentifierForVendor returns the IdentifierForVendor field if non-nil, zero value otherwise. 77 | 78 | ### GetIdentifierForVendorOk 79 | 80 | `func (o *LoginRequest) GetIdentifierForVendorOk() (*string, bool)` 81 | 82 | GetIdentifierForVendorOk returns a tuple with the IdentifierForVendor field if it's non-nil, zero value otherwise 83 | and a boolean to check if the value has been set. 84 | 85 | ### SetIdentifierForVendor 86 | 87 | `func (o *LoginRequest) SetIdentifierForVendor(v string)` 88 | 89 | SetIdentifierForVendor sets IdentifierForVendor field to given value. 90 | 91 | 92 | ### GetLocale 93 | 94 | `func (o *LoginRequest) GetLocale() string` 95 | 96 | GetLocale returns the Locale field if non-nil, zero value otherwise. 97 | 98 | ### GetLocaleOk 99 | 100 | `func (o *LoginRequest) GetLocaleOk() (*string, bool)` 101 | 102 | GetLocaleOk returns a tuple with the Locale field if it's non-nil, zero value otherwise 103 | and a boolean to check if the value has been set. 104 | 105 | ### SetLocale 106 | 107 | `func (o *LoginRequest) SetLocale(v string)` 108 | 109 | SetLocale sets Locale field to given value. 110 | 111 | 112 | ### GetUser 113 | 114 | `func (o *LoginRequest) GetUser() LoginRequestUser` 115 | 116 | GetUser returns the User field if non-nil, zero value otherwise. 117 | 118 | ### GetUserOk 119 | 120 | `func (o *LoginRequest) GetUserOk() (*LoginRequestUser, bool)` 121 | 122 | GetUserOk returns a tuple with the User field if it's non-nil, zero value otherwise 123 | and a boolean to check if the value has been set. 124 | 125 | ### SetUser 126 | 127 | `func (o *LoginRequest) SetUser(v LoginRequestUser)` 128 | 129 | SetUser sets User field to given value. 130 | 131 | 132 | 133 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 134 | 135 | 136 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Aura Frames OpenAPI [unofficial] 2 | This project attempts to map the [Aura Frames](https://auraframes.com) REST API in use by the iPhone application 3 | 4 | This API Currently supports simplistic data access. Accessing your frames, assets and the recursive objects below them. 5 | 6 | ## Installation 7 | ### Golang 8 | go get github.com/bp1222/auraframes-api/auraframes 9 | 10 | ## Language Documentation 11 | ### [Golang](go/README.md) 12 | 13 | ## Development 14 | To build the API you need to install `swagger-cli` and `openapi-generator` 15 | 16 | ### MacOS 17 | npm install 18 | 19 | 20 | ## Notice 21 | The Aura Frames REST API does not allow for direct uploading of images. That seems to happen over a non-http protocol. 22 | 23 | However, each [frame](go/docs/Frame.md) has a `email_address` field which is an email you can send images to upload. Below is basic code to send an image (in the form of a URL) to the frame 24 | 25 | ```golang 26 | import ( 27 | "bytes" 28 | "encoding/base64" 29 | "fmt" 30 | "io" 31 | "io/ioutil" 32 | "math/rand" 33 | "mime/multipart" 34 | "net/http" 35 | "net/smtp" 36 | "os" 37 | "path" 38 | "path/filepath" 39 | "strings" 40 | 41 | "github.com/bp1222/auraframes-api/auraframes" 42 | ) 43 | 44 | var ( 45 | host = os.Getenv("EMAIL_HOST") 46 | username = os.Getenv("EMAiL_USERNAME") 47 | password = os.Getenv("EMAIL_PASSWORD") 48 | portNumber = os.Getenv("EMAIL_PORT") 49 | ) 50 | 51 | func SendAuraFrameEmail(frame auraframes.Frame, imageUrl string) { 52 | sender := New() 53 | m := NewMessage("Image Upload", imageUrl) 54 | m.To = []string{frame.GetEmailAddress()} 55 | m.AttachUrlImage(image) 56 | fmt.Println(sender.Send(m)) 57 | } 58 | 59 | type Sender struct { 60 | auth smtp.Auth 61 | } 62 | 63 | type Message struct { 64 | To []string 65 | Subject string 66 | Body string 67 | Attachments map[string][]byte 68 | } 69 | 70 | func New() *Sender { 71 | auth := smtp.PlainAuth("", username, password, host) 72 | return &Sender{auth} 73 | } 74 | 75 | func (s *Sender) Send(m *Message) error { 76 | return smtp.SendMail(fmt.Sprintf("%s:%s", host, portNumber), s.auth, username, m.To, m.ToBytes()) 77 | } 78 | 79 | func NewMessage(s, b string) *Message { 80 | return &Message{ 81 | Subject: s, 82 | Body: b, 83 | Attachments: make(map[string][]byte), 84 | } 85 | } 86 | 87 | func (m *Message) AttachUrlImage(url string) error { 88 | resp, err := http.Get(url) 89 | if err != nil { 90 | return err 91 | } 92 | defer resp.Body.Close() 93 | 94 | imageBytes, err := io.ReadAll(resp.Body) 95 | if err != nil { 96 | return err 97 | } 98 | 99 | filename := path.Base(resp.Request.URL.Path) 100 | 101 | m.Attachments[filename] = imageBytes 102 | 103 | return nil 104 | } 105 | 106 | func (m *Message) AttachFile(src string) error { 107 | b, err := ioutil.ReadFile(src) 108 | if err != nil { 109 | return err 110 | } 111 | 112 | _, fileName := filepath.Split(src) 113 | m.Attachments[fileName] = b 114 | return nil 115 | } 116 | 117 | func (m *Message) ToBytes() []byte { 118 | buf := bytes.NewBuffer(nil) 119 | withAttachments := len(m.Attachments) > 0 120 | buf.WriteString(fmt.Sprintf("Subject: %s\n", m.Subject)) 121 | buf.WriteString(fmt.Sprintf("To: %s\n", strings.Join(m.To, ","))) 122 | 123 | buf.WriteString("MIME-Version: 1.0\n") 124 | 125 | mixedWriter := multipart.NewWriter(buf) 126 | altWriter := multipart.NewWriter(buf) 127 | mixedBoundary := mixedWriter.Boundary() 128 | altBoundary := altWriter.Boundary() 129 | 130 | if withAttachments { 131 | buf.WriteString(fmt.Sprintf("Content-Type: multipart/mixed; boundary=\"%s\"\n", mixedBoundary)) 132 | buf.WriteString(fmt.Sprintf("--%s\n", mixedBoundary)) 133 | buf.WriteString(fmt.Sprintf("Content-Type: multipart/alternative; boundary=\"%s\"\n", altBoundary)) 134 | buf.WriteString(fmt.Sprintf("--%s\n", altBoundary)) 135 | } 136 | 137 | buf.WriteString("Content-Type: text/plain; charset=utf-8\n") 138 | buf.WriteString(m.Body) 139 | buf.WriteString(fmt.Sprintf("\n\n--%s--\n", altBoundary)) 140 | if withAttachments { 141 | for k, v := range m.Attachments { 142 | buf.WriteString(fmt.Sprintf("\n\n--%s\n", mixedBoundary)) 143 | buf.WriteString(fmt.Sprintf("Content-Type: %s; name=\"%s\"\n", http.DetectContentType(v), k)) 144 | buf.WriteString(fmt.Sprintf("Content-Disposition: attachment; filename=\"%s\"\n", k)) 145 | buf.WriteString("Content-Transfer-Encoding: base64\n\n") 146 | 147 | b := make([]byte, base64.StdEncoding.EncodedLen(len(v))) 148 | base64.StdEncoding.Encode(b, v) 149 | buf.Write(b) 150 | buf.WriteString(fmt.Sprintf("\n--%s", mixedBoundary)) 151 | } 152 | 153 | buf.WriteString("--") 154 | } 155 | 156 | return buf.Bytes() 157 | } 158 | ``` 159 | 160 | -------------------------------------------------------------------------------- /auraframes/README.md: -------------------------------------------------------------------------------- 1 | # Go API client for auraframes 2 | 3 | Reverse Engineered API for Aura Frames 4 | 5 | ## Overview 6 | This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client. 7 | 8 | - API version: 0.0.1 9 | - Package version: 1.0.0 10 | - Build package: org.openapitools.codegen.languages.GoClientCodegen 11 | 12 | ## Installation 13 | 14 | Install the following dependencies: 15 | 16 | ```shell 17 | go get github.com/stretchr/testify/assert 18 | go get golang.org/x/oauth2 19 | go get golang.org/x/net/context 20 | ``` 21 | 22 | Put the package under your project folder and add the following in import: 23 | 24 | ```golang 25 | import auraframes "github.com/bp1222/auraframes-api/auraframes" 26 | ``` 27 | 28 | To use a proxy, set the environment variable `HTTP_PROXY`: 29 | 30 | ```golang 31 | os.Setenv("HTTP_PROXY", "http://proxy_name:proxy_port") 32 | ``` 33 | 34 | ## Configuration of Server URL 35 | 36 | Default configuration comes with `Servers` field that contains server objects as defined in the OpenAPI specification. 37 | 38 | ### Select Server Configuration 39 | 40 | For using other server than the one defined on index 0 set context value `sw.ContextServerIndex` of type `int`. 41 | 42 | ```golang 43 | ctx := context.WithValue(context.Background(), auraframes.ContextServerIndex, 1) 44 | ``` 45 | 46 | ### Templated Server URL 47 | 48 | Templated server URL is formatted using default variables from configuration or from context value `sw.ContextServerVariables` of type `map[string]string`. 49 | 50 | ```golang 51 | ctx := context.WithValue(context.Background(), auraframes.ContextServerVariables, map[string]string{ 52 | "basePath": "v2", 53 | }) 54 | ``` 55 | 56 | Note, enum values are always validated and all unused variables are silently ignored. 57 | 58 | ### URLs Configuration per Operation 59 | 60 | Each operation can use different server URL defined using `OperationServers` map in the `Configuration`. 61 | An operation is uniquely identified by `"{classname}Service.{nickname}"` string. 62 | Similar rules for overriding default operation server index and variables applies by using `sw.ContextOperationServerIndices` and `sw.ContextOperationServerVariables` context maps. 63 | 64 | ``` 65 | ctx := context.WithValue(context.Background(), auraframes.ContextOperationServerIndices, map[string]int{ 66 | "{classname}Service.{nickname}": 2, 67 | }) 68 | ctx = context.WithValue(context.Background(), auraframes.ContextOperationServerVariables, map[string]map[string]string{ 69 | "{classname}Service.{nickname}": { 70 | "port": "8443", 71 | }, 72 | }) 73 | ``` 74 | 75 | ## Documentation for API Endpoints 76 | 77 | All URIs are relative to *https://api.pushd.com/v5* 78 | 79 | Class | Method | HTTP request | Description 80 | ------------ | ------------- | ------------- | ------------- 81 | *AuthApi* | [**Login**](docs/AuthApi.md#login) | **Post** /login.json | Login to Aura Frames 82 | *FramesApi* | [**GetFrames**](docs/FramesApi.md#getframes) | **Get** /frames.json | Access to an Aura Frame 83 | 84 | 85 | ## Documentation For Models 86 | 87 | - [Asset](docs/Asset.md) 88 | - [ContributorTokens](docs/ContributorTokens.md) 89 | - [CurrentUser](docs/CurrentUser.md) 90 | - [FeedItem](docs/FeedItem.md) 91 | - [Frame](docs/Frame.md) 92 | - [FrameEnvironment](docs/FrameEnvironment.md) 93 | - [Frames](docs/Frames.md) 94 | - [Impression](docs/Impression.md) 95 | - [LoginRequest](docs/LoginRequest.md) 96 | - [LoginRequestUser](docs/LoginRequestUser.md) 97 | - [LoginResponse](docs/LoginResponse.md) 98 | - [LoginResponseResult](docs/LoginResponseResult.md) 99 | - [Metadata](docs/Metadata.md) 100 | - [User](docs/User.md) 101 | 102 | 103 | ## Documentation For Authorization 104 | 105 | 106 | 107 | ### TokenAuth 108 | 109 | - **Type**: API key 110 | - **API key parameter name**: x-token-auth 111 | - **Location**: HTTP header 112 | 113 | Note, each API key must be added to a map of `map[string]APIKey` where the key is: x-token-auth and passed in as the auth context for each request. 114 | 115 | 116 | ### UserId 117 | 118 | - **Type**: API key 119 | - **API key parameter name**: x-user-id 120 | - **Location**: HTTP header 121 | 122 | Note, each API key must be added to a map of `map[string]APIKey` where the key is: x-user-id and passed in as the auth context for each request. 123 | 124 | 125 | ## Documentation for Utility Methods 126 | 127 | Due to the fact that model structure members are all pointers, this package contains 128 | a number of utility functions to easily obtain pointers to values of basic types. 129 | Each of these functions takes a value of the given basic type and returns a pointer to it: 130 | 131 | * `PtrBool` 132 | * `PtrInt` 133 | * `PtrInt32` 134 | * `PtrInt64` 135 | * `PtrFloat` 136 | * `PtrFloat32` 137 | * `PtrFloat64` 138 | * `PtrString` 139 | * `PtrTime` 140 | 141 | ## Author 142 | 143 | dave@mudsite.com 144 | 145 | -------------------------------------------------------------------------------- /auraframes/docs/FrameEnvironment.md: -------------------------------------------------------------------------------- 1 | # FrameEnvironment 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Id** | Pointer to **string** | | [optional] 8 | **FrameId** | Pointer to **string** | | [optional] 9 | **LastOnlineAt** | Pointer to **string** | | [optional] 10 | **CreatedAt** | Pointer to **string** | | [optional] 11 | **UpdatedAt** | Pointer to **string** | | [optional] 12 | 13 | ## Methods 14 | 15 | ### NewFrameEnvironment 16 | 17 | `func NewFrameEnvironment() *FrameEnvironment` 18 | 19 | NewFrameEnvironment instantiates a new FrameEnvironment object 20 | This constructor will assign default values to properties that have it defined, 21 | and makes sure properties required by API are set, but the set of arguments 22 | will change when the set of required properties is changed 23 | 24 | ### NewFrameEnvironmentWithDefaults 25 | 26 | `func NewFrameEnvironmentWithDefaults() *FrameEnvironment` 27 | 28 | NewFrameEnvironmentWithDefaults instantiates a new FrameEnvironment object 29 | This constructor will only assign default values to properties that have it defined, 30 | but it doesn't guarantee that properties required by API are set 31 | 32 | ### GetId 33 | 34 | `func (o *FrameEnvironment) GetId() string` 35 | 36 | GetId returns the Id field if non-nil, zero value otherwise. 37 | 38 | ### GetIdOk 39 | 40 | `func (o *FrameEnvironment) GetIdOk() (*string, bool)` 41 | 42 | GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise 43 | and a boolean to check if the value has been set. 44 | 45 | ### SetId 46 | 47 | `func (o *FrameEnvironment) SetId(v string)` 48 | 49 | SetId sets Id field to given value. 50 | 51 | ### HasId 52 | 53 | `func (o *FrameEnvironment) HasId() bool` 54 | 55 | HasId returns a boolean if a field has been set. 56 | 57 | ### GetFrameId 58 | 59 | `func (o *FrameEnvironment) GetFrameId() string` 60 | 61 | GetFrameId returns the FrameId field if non-nil, zero value otherwise. 62 | 63 | ### GetFrameIdOk 64 | 65 | `func (o *FrameEnvironment) GetFrameIdOk() (*string, bool)` 66 | 67 | GetFrameIdOk returns a tuple with the FrameId field if it's non-nil, zero value otherwise 68 | and a boolean to check if the value has been set. 69 | 70 | ### SetFrameId 71 | 72 | `func (o *FrameEnvironment) SetFrameId(v string)` 73 | 74 | SetFrameId sets FrameId field to given value. 75 | 76 | ### HasFrameId 77 | 78 | `func (o *FrameEnvironment) HasFrameId() bool` 79 | 80 | HasFrameId returns a boolean if a field has been set. 81 | 82 | ### GetLastOnlineAt 83 | 84 | `func (o *FrameEnvironment) GetLastOnlineAt() string` 85 | 86 | GetLastOnlineAt returns the LastOnlineAt field if non-nil, zero value otherwise. 87 | 88 | ### GetLastOnlineAtOk 89 | 90 | `func (o *FrameEnvironment) GetLastOnlineAtOk() (*string, bool)` 91 | 92 | GetLastOnlineAtOk returns a tuple with the LastOnlineAt field if it's non-nil, zero value otherwise 93 | and a boolean to check if the value has been set. 94 | 95 | ### SetLastOnlineAt 96 | 97 | `func (o *FrameEnvironment) SetLastOnlineAt(v string)` 98 | 99 | SetLastOnlineAt sets LastOnlineAt field to given value. 100 | 101 | ### HasLastOnlineAt 102 | 103 | `func (o *FrameEnvironment) HasLastOnlineAt() bool` 104 | 105 | HasLastOnlineAt returns a boolean if a field has been set. 106 | 107 | ### GetCreatedAt 108 | 109 | `func (o *FrameEnvironment) GetCreatedAt() string` 110 | 111 | GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. 112 | 113 | ### GetCreatedAtOk 114 | 115 | `func (o *FrameEnvironment) GetCreatedAtOk() (*string, bool)` 116 | 117 | GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise 118 | and a boolean to check if the value has been set. 119 | 120 | ### SetCreatedAt 121 | 122 | `func (o *FrameEnvironment) SetCreatedAt(v string)` 123 | 124 | SetCreatedAt sets CreatedAt field to given value. 125 | 126 | ### HasCreatedAt 127 | 128 | `func (o *FrameEnvironment) HasCreatedAt() bool` 129 | 130 | HasCreatedAt returns a boolean if a field has been set. 131 | 132 | ### GetUpdatedAt 133 | 134 | `func (o *FrameEnvironment) GetUpdatedAt() string` 135 | 136 | GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. 137 | 138 | ### GetUpdatedAtOk 139 | 140 | `func (o *FrameEnvironment) GetUpdatedAtOk() (*string, bool)` 141 | 142 | GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise 143 | and a boolean to check if the value has been set. 144 | 145 | ### SetUpdatedAt 146 | 147 | `func (o *FrameEnvironment) SetUpdatedAt(v string)` 148 | 149 | SetUpdatedAt sets UpdatedAt field to given value. 150 | 151 | ### HasUpdatedAt 152 | 153 | `func (o *FrameEnvironment) HasUpdatedAt() bool` 154 | 155 | HasUpdatedAt returns a boolean if a field has been set. 156 | 157 | 158 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 159 | 160 | 161 | -------------------------------------------------------------------------------- /auraframes/api_frames.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "bytes" 16 | "context" 17 | "io/ioutil" 18 | "net/http" 19 | "net/url" 20 | ) 21 | 22 | 23 | type FramesApi interface { 24 | 25 | /* 26 | GetFrames Access to an Aura Frame 27 | 28 | @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). 29 | @return ApiGetFramesRequest 30 | */ 31 | GetFrames(ctx context.Context) ApiGetFramesRequest 32 | 33 | // GetFramesExecute executes the request 34 | // @return Frames 35 | GetFramesExecute(r ApiGetFramesRequest) (*Frames, *http.Response, error) 36 | } 37 | 38 | // FramesApiService FramesApi service 39 | type FramesApiService service 40 | 41 | type ApiGetFramesRequest struct { 42 | ctx context.Context 43 | ApiService FramesApi 44 | includeSharedAlbums *string 45 | } 46 | 47 | func (r ApiGetFramesRequest) IncludeSharedAlbums(includeSharedAlbums string) ApiGetFramesRequest { 48 | r.includeSharedAlbums = &includeSharedAlbums 49 | return r 50 | } 51 | 52 | func (r ApiGetFramesRequest) Execute() (*Frames, *http.Response, error) { 53 | return r.ApiService.GetFramesExecute(r) 54 | } 55 | 56 | /* 57 | GetFrames Access to an Aura Frame 58 | 59 | @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). 60 | @return ApiGetFramesRequest 61 | */ 62 | func (a *FramesApiService) GetFrames(ctx context.Context) ApiGetFramesRequest { 63 | return ApiGetFramesRequest{ 64 | ApiService: a, 65 | ctx: ctx, 66 | } 67 | } 68 | 69 | // Execute executes the request 70 | // @return Frames 71 | func (a *FramesApiService) GetFramesExecute(r ApiGetFramesRequest) (*Frames, *http.Response, error) { 72 | var ( 73 | localVarHTTPMethod = http.MethodGet 74 | localVarPostBody interface{} 75 | formFiles []formFile 76 | localVarReturnValue *Frames 77 | ) 78 | 79 | localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "FramesApiService.GetFrames") 80 | if err != nil { 81 | return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} 82 | } 83 | 84 | localVarPath := localBasePath + "/frames.json" 85 | 86 | localVarHeaderParams := make(map[string]string) 87 | localVarQueryParams := url.Values{} 88 | localVarFormParams := url.Values{} 89 | 90 | if r.includeSharedAlbums != nil { 91 | localVarQueryParams.Add("include_shared_albums", parameterToString(*r.includeSharedAlbums, "")) 92 | } 93 | // to determine the Content-Type header 94 | localVarHTTPContentTypes := []string{} 95 | 96 | // set Content-Type header 97 | localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) 98 | if localVarHTTPContentType != "" { 99 | localVarHeaderParams["Content-Type"] = localVarHTTPContentType 100 | } 101 | 102 | // to determine the Accept header 103 | localVarHTTPHeaderAccepts := []string{"application/json"} 104 | 105 | // set Accept header 106 | localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) 107 | if localVarHTTPHeaderAccept != "" { 108 | localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept 109 | } 110 | if r.ctx != nil { 111 | // API Key Authentication 112 | if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { 113 | if apiKey, ok := auth["TokenAuth"]; ok { 114 | var key string 115 | if apiKey.Prefix != "" { 116 | key = apiKey.Prefix + " " + apiKey.Key 117 | } else { 118 | key = apiKey.Key 119 | } 120 | localVarHeaderParams["x-token-auth"] = key 121 | } 122 | } 123 | } 124 | if r.ctx != nil { 125 | // API Key Authentication 126 | if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { 127 | if apiKey, ok := auth["UserId"]; ok { 128 | var key string 129 | if apiKey.Prefix != "" { 130 | key = apiKey.Prefix + " " + apiKey.Key 131 | } else { 132 | key = apiKey.Key 133 | } 134 | localVarHeaderParams["x-user-id"] = key 135 | } 136 | } 137 | } 138 | req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) 139 | if err != nil { 140 | return localVarReturnValue, nil, err 141 | } 142 | 143 | localVarHTTPResponse, err := a.client.callAPI(req) 144 | if err != nil || localVarHTTPResponse == nil { 145 | return localVarReturnValue, localVarHTTPResponse, err 146 | } 147 | 148 | localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) 149 | localVarHTTPResponse.Body.Close() 150 | localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) 151 | if err != nil { 152 | return localVarReturnValue, localVarHTTPResponse, err 153 | } 154 | 155 | if localVarHTTPResponse.StatusCode >= 300 { 156 | newErr := &GenericOpenAPIError{ 157 | body: localVarBody, 158 | error: localVarHTTPResponse.Status, 159 | } 160 | return localVarReturnValue, localVarHTTPResponse, newErr 161 | } 162 | 163 | err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) 164 | if err != nil { 165 | newErr := &GenericOpenAPIError{ 166 | body: localVarBody, 167 | error: err.Error(), 168 | } 169 | return localVarReturnValue, localVarHTTPResponse, newErr 170 | } 171 | 172 | return localVarReturnValue, localVarHTTPResponse, nil 173 | } 174 | -------------------------------------------------------------------------------- /auraframes/api_auth.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "bytes" 16 | "context" 17 | "io/ioutil" 18 | "net/http" 19 | "net/url" 20 | ) 21 | 22 | 23 | type AuthApi interface { 24 | 25 | /* 26 | Login Login to Aura Frames 27 | 28 | @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). 29 | @return ApiLoginRequest 30 | */ 31 | Login(ctx context.Context) ApiLoginRequest 32 | 33 | // LoginExecute executes the request 34 | // @return LoginResponse 35 | LoginExecute(r ApiLoginRequest) (*LoginResponse, *http.Response, error) 36 | } 37 | 38 | // AuthApiService AuthApi service 39 | type AuthApiService service 40 | 41 | type ApiLoginRequest struct { 42 | ctx context.Context 43 | ApiService AuthApi 44 | xDeviceIdentifier *string 45 | xClientDeviceId *string 46 | loginRequest *LoginRequest 47 | } 48 | 49 | func (r ApiLoginRequest) XDeviceIdentifier(xDeviceIdentifier string) ApiLoginRequest { 50 | r.xDeviceIdentifier = &xDeviceIdentifier 51 | return r 52 | } 53 | 54 | func (r ApiLoginRequest) XClientDeviceId(xClientDeviceId string) ApiLoginRequest { 55 | r.xClientDeviceId = &xClientDeviceId 56 | return r 57 | } 58 | 59 | // Login Information 60 | func (r ApiLoginRequest) LoginRequest(loginRequest LoginRequest) ApiLoginRequest { 61 | r.loginRequest = &loginRequest 62 | return r 63 | } 64 | 65 | func (r ApiLoginRequest) Execute() (*LoginResponse, *http.Response, error) { 66 | return r.ApiService.LoginExecute(r) 67 | } 68 | 69 | /* 70 | Login Login to Aura Frames 71 | 72 | @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background(). 73 | @return ApiLoginRequest 74 | */ 75 | func (a *AuthApiService) Login(ctx context.Context) ApiLoginRequest { 76 | return ApiLoginRequest{ 77 | ApiService: a, 78 | ctx: ctx, 79 | } 80 | } 81 | 82 | // Execute executes the request 83 | // @return LoginResponse 84 | func (a *AuthApiService) LoginExecute(r ApiLoginRequest) (*LoginResponse, *http.Response, error) { 85 | var ( 86 | localVarHTTPMethod = http.MethodPost 87 | localVarPostBody interface{} 88 | formFiles []formFile 89 | localVarReturnValue *LoginResponse 90 | ) 91 | 92 | localBasePath, err := a.client.cfg.ServerURLWithContext(r.ctx, "AuthApiService.Login") 93 | if err != nil { 94 | return localVarReturnValue, nil, &GenericOpenAPIError{error: err.Error()} 95 | } 96 | 97 | localVarPath := localBasePath + "/login.json" 98 | 99 | localVarHeaderParams := make(map[string]string) 100 | localVarQueryParams := url.Values{} 101 | localVarFormParams := url.Values{} 102 | 103 | // to determine the Content-Type header 104 | localVarHTTPContentTypes := []string{"application/json"} 105 | 106 | // set Content-Type header 107 | localVarHTTPContentType := selectHeaderContentType(localVarHTTPContentTypes) 108 | if localVarHTTPContentType != "" { 109 | localVarHeaderParams["Content-Type"] = localVarHTTPContentType 110 | } 111 | 112 | // to determine the Accept header 113 | localVarHTTPHeaderAccepts := []string{"application/json"} 114 | 115 | // set Accept header 116 | localVarHTTPHeaderAccept := selectHeaderAccept(localVarHTTPHeaderAccepts) 117 | if localVarHTTPHeaderAccept != "" { 118 | localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept 119 | } 120 | if r.xDeviceIdentifier != nil { 121 | localVarHeaderParams["x-device-identifier"] = parameterToString(*r.xDeviceIdentifier, "") 122 | } 123 | if r.xClientDeviceId != nil { 124 | localVarHeaderParams["x-client-device-id"] = parameterToString(*r.xClientDeviceId, "") 125 | } 126 | // body params 127 | localVarPostBody = r.loginRequest 128 | if r.ctx != nil { 129 | // API Key Authentication 130 | if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { 131 | if apiKey, ok := auth["TokenAuth"]; ok { 132 | var key string 133 | if apiKey.Prefix != "" { 134 | key = apiKey.Prefix + " " + apiKey.Key 135 | } else { 136 | key = apiKey.Key 137 | } 138 | localVarHeaderParams["x-token-auth"] = key 139 | } 140 | } 141 | } 142 | if r.ctx != nil { 143 | // API Key Authentication 144 | if auth, ok := r.ctx.Value(ContextAPIKeys).(map[string]APIKey); ok { 145 | if apiKey, ok := auth["UserId"]; ok { 146 | var key string 147 | if apiKey.Prefix != "" { 148 | key = apiKey.Prefix + " " + apiKey.Key 149 | } else { 150 | key = apiKey.Key 151 | } 152 | localVarHeaderParams["x-user-id"] = key 153 | } 154 | } 155 | } 156 | req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) 157 | if err != nil { 158 | return localVarReturnValue, nil, err 159 | } 160 | 161 | localVarHTTPResponse, err := a.client.callAPI(req) 162 | if err != nil || localVarHTTPResponse == nil { 163 | return localVarReturnValue, localVarHTTPResponse, err 164 | } 165 | 166 | localVarBody, err := ioutil.ReadAll(localVarHTTPResponse.Body) 167 | localVarHTTPResponse.Body.Close() 168 | localVarHTTPResponse.Body = ioutil.NopCloser(bytes.NewBuffer(localVarBody)) 169 | if err != nil { 170 | return localVarReturnValue, localVarHTTPResponse, err 171 | } 172 | 173 | if localVarHTTPResponse.StatusCode >= 300 { 174 | newErr := &GenericOpenAPIError{ 175 | body: localVarBody, 176 | error: localVarHTTPResponse.Status, 177 | } 178 | return localVarReturnValue, localVarHTTPResponse, newErr 179 | } 180 | 181 | err = a.client.decode(&localVarReturnValue, localVarBody, localVarHTTPResponse.Header.Get("Content-Type")) 182 | if err != nil { 183 | newErr := &GenericOpenAPIError{ 184 | body: localVarBody, 185 | error: err.Error(), 186 | } 187 | return localVarReturnValue, localVarHTTPResponse, newErr 188 | } 189 | 190 | return localVarReturnValue, localVarHTTPResponse, nil 191 | } 192 | -------------------------------------------------------------------------------- /auraframes/model_feed_item.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // FeedItem struct for FeedItem 19 | type FeedItem struct { 20 | Assets []Asset `json:"assets,omitempty"` 21 | Metadata *Metadata `json:"metadata,omitempty"` 22 | Message *string `json:"message,omitempty"` 23 | StickFor *string `json:"stick_for,omitempty"` 24 | } 25 | 26 | // NewFeedItem instantiates a new FeedItem object 27 | // This constructor will assign default values to properties that have it defined, 28 | // and makes sure properties required by API are set, but the set of arguments 29 | // will change when the set of required properties is changed 30 | func NewFeedItem() *FeedItem { 31 | this := FeedItem{} 32 | return &this 33 | } 34 | 35 | // NewFeedItemWithDefaults instantiates a new FeedItem object 36 | // This constructor will only assign default values to properties that have it defined, 37 | // but it doesn't guarantee that properties required by API are set 38 | func NewFeedItemWithDefaults() *FeedItem { 39 | this := FeedItem{} 40 | return &this 41 | } 42 | 43 | // GetAssets returns the Assets field value if set, zero value otherwise. 44 | func (o *FeedItem) GetAssets() []Asset { 45 | if o == nil || o.Assets == nil { 46 | var ret []Asset 47 | return ret 48 | } 49 | return o.Assets 50 | } 51 | 52 | // GetAssetsOk returns a tuple with the Assets field value if set, nil otherwise 53 | // and a boolean to check if the value has been set. 54 | func (o *FeedItem) GetAssetsOk() ([]Asset, bool) { 55 | if o == nil || o.Assets == nil { 56 | return nil, false 57 | } 58 | return o.Assets, true 59 | } 60 | 61 | // HasAssets returns a boolean if a field has been set. 62 | func (o *FeedItem) HasAssets() bool { 63 | if o != nil && o.Assets != nil { 64 | return true 65 | } 66 | 67 | return false 68 | } 69 | 70 | // SetAssets gets a reference to the given []Asset and assigns it to the Assets field. 71 | func (o *FeedItem) SetAssets(v []Asset) { 72 | o.Assets = v 73 | } 74 | 75 | // GetMetadata returns the Metadata field value if set, zero value otherwise. 76 | func (o *FeedItem) GetMetadata() Metadata { 77 | if o == nil || o.Metadata == nil { 78 | var ret Metadata 79 | return ret 80 | } 81 | return *o.Metadata 82 | } 83 | 84 | // GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise 85 | // and a boolean to check if the value has been set. 86 | func (o *FeedItem) GetMetadataOk() (*Metadata, bool) { 87 | if o == nil || o.Metadata == nil { 88 | return nil, false 89 | } 90 | return o.Metadata, true 91 | } 92 | 93 | // HasMetadata returns a boolean if a field has been set. 94 | func (o *FeedItem) HasMetadata() bool { 95 | if o != nil && o.Metadata != nil { 96 | return true 97 | } 98 | 99 | return false 100 | } 101 | 102 | // SetMetadata gets a reference to the given Metadata and assigns it to the Metadata field. 103 | func (o *FeedItem) SetMetadata(v Metadata) { 104 | o.Metadata = &v 105 | } 106 | 107 | // GetMessage returns the Message field value if set, zero value otherwise. 108 | func (o *FeedItem) GetMessage() string { 109 | if o == nil || o.Message == nil { 110 | var ret string 111 | return ret 112 | } 113 | return *o.Message 114 | } 115 | 116 | // GetMessageOk returns a tuple with the Message field value if set, nil otherwise 117 | // and a boolean to check if the value has been set. 118 | func (o *FeedItem) GetMessageOk() (*string, bool) { 119 | if o == nil || o.Message == nil { 120 | return nil, false 121 | } 122 | return o.Message, true 123 | } 124 | 125 | // HasMessage returns a boolean if a field has been set. 126 | func (o *FeedItem) HasMessage() bool { 127 | if o != nil && o.Message != nil { 128 | return true 129 | } 130 | 131 | return false 132 | } 133 | 134 | // SetMessage gets a reference to the given string and assigns it to the Message field. 135 | func (o *FeedItem) SetMessage(v string) { 136 | o.Message = &v 137 | } 138 | 139 | // GetStickFor returns the StickFor field value if set, zero value otherwise. 140 | func (o *FeedItem) GetStickFor() string { 141 | if o == nil || o.StickFor == nil { 142 | var ret string 143 | return ret 144 | } 145 | return *o.StickFor 146 | } 147 | 148 | // GetStickForOk returns a tuple with the StickFor field value if set, nil otherwise 149 | // and a boolean to check if the value has been set. 150 | func (o *FeedItem) GetStickForOk() (*string, bool) { 151 | if o == nil || o.StickFor == nil { 152 | return nil, false 153 | } 154 | return o.StickFor, true 155 | } 156 | 157 | // HasStickFor returns a boolean if a field has been set. 158 | func (o *FeedItem) HasStickFor() bool { 159 | if o != nil && o.StickFor != nil { 160 | return true 161 | } 162 | 163 | return false 164 | } 165 | 166 | // SetStickFor gets a reference to the given string and assigns it to the StickFor field. 167 | func (o *FeedItem) SetStickFor(v string) { 168 | o.StickFor = &v 169 | } 170 | 171 | func (o FeedItem) MarshalJSON() ([]byte, error) { 172 | toSerialize := map[string]interface{}{} 173 | if o.Assets != nil { 174 | toSerialize["assets"] = o.Assets 175 | } 176 | if o.Metadata != nil { 177 | toSerialize["metadata"] = o.Metadata 178 | } 179 | if o.Message != nil { 180 | toSerialize["message"] = o.Message 181 | } 182 | if o.StickFor != nil { 183 | toSerialize["stick_for"] = o.StickFor 184 | } 185 | return json.Marshal(toSerialize) 186 | } 187 | 188 | type NullableFeedItem struct { 189 | value *FeedItem 190 | isSet bool 191 | } 192 | 193 | func (v NullableFeedItem) Get() *FeedItem { 194 | return v.value 195 | } 196 | 197 | func (v *NullableFeedItem) Set(val *FeedItem) { 198 | v.value = val 199 | v.isSet = true 200 | } 201 | 202 | func (v NullableFeedItem) IsSet() bool { 203 | return v.isSet 204 | } 205 | 206 | func (v *NullableFeedItem) Unset() { 207 | v.value = nil 208 | v.isSet = false 209 | } 210 | 211 | func NewNullableFeedItem(val *FeedItem) *NullableFeedItem { 212 | return &NullableFeedItem{value: val, isSet: true} 213 | } 214 | 215 | func (v NullableFeedItem) MarshalJSON() ([]byte, error) { 216 | return json.Marshal(v.value) 217 | } 218 | 219 | func (v *NullableFeedItem) UnmarshalJSON(src []byte) error { 220 | v.isSet = true 221 | return json.Unmarshal(src, &v.value) 222 | } 223 | 224 | 225 | -------------------------------------------------------------------------------- /auraframes/model_login_request.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // LoginRequest struct for LoginRequest 19 | type LoginRequest struct { 20 | AppIdentifier string `json:"app_identifier"` 21 | ClientDeviceId string `json:"client_device_id"` 22 | IdentifierForVendor string `json:"identifier_for_vendor"` 23 | Locale string `json:"locale"` 24 | User LoginRequestUser `json:"user"` 25 | } 26 | 27 | // NewLoginRequest instantiates a new LoginRequest object 28 | // This constructor will assign default values to properties that have it defined, 29 | // and makes sure properties required by API are set, but the set of arguments 30 | // will change when the set of required properties is changed 31 | func NewLoginRequest(appIdentifier string, clientDeviceId string, identifierForVendor string, locale string, user LoginRequestUser) *LoginRequest { 32 | this := LoginRequest{} 33 | this.AppIdentifier = appIdentifier 34 | this.ClientDeviceId = clientDeviceId 35 | this.IdentifierForVendor = identifierForVendor 36 | this.Locale = locale 37 | this.User = user 38 | return &this 39 | } 40 | 41 | // NewLoginRequestWithDefaults instantiates a new LoginRequest object 42 | // This constructor will only assign default values to properties that have it defined, 43 | // but it doesn't guarantee that properties required by API are set 44 | func NewLoginRequestWithDefaults() *LoginRequest { 45 | this := LoginRequest{} 46 | return &this 47 | } 48 | 49 | // GetAppIdentifier returns the AppIdentifier field value 50 | func (o *LoginRequest) GetAppIdentifier() string { 51 | if o == nil { 52 | var ret string 53 | return ret 54 | } 55 | 56 | return o.AppIdentifier 57 | } 58 | 59 | // GetAppIdentifierOk returns a tuple with the AppIdentifier field value 60 | // and a boolean to check if the value has been set. 61 | func (o *LoginRequest) GetAppIdentifierOk() (*string, bool) { 62 | if o == nil { 63 | return nil, false 64 | } 65 | return &o.AppIdentifier, true 66 | } 67 | 68 | // SetAppIdentifier sets field value 69 | func (o *LoginRequest) SetAppIdentifier(v string) { 70 | o.AppIdentifier = v 71 | } 72 | 73 | // GetClientDeviceId returns the ClientDeviceId field value 74 | func (o *LoginRequest) GetClientDeviceId() string { 75 | if o == nil { 76 | var ret string 77 | return ret 78 | } 79 | 80 | return o.ClientDeviceId 81 | } 82 | 83 | // GetClientDeviceIdOk returns a tuple with the ClientDeviceId field value 84 | // and a boolean to check if the value has been set. 85 | func (o *LoginRequest) GetClientDeviceIdOk() (*string, bool) { 86 | if o == nil { 87 | return nil, false 88 | } 89 | return &o.ClientDeviceId, true 90 | } 91 | 92 | // SetClientDeviceId sets field value 93 | func (o *LoginRequest) SetClientDeviceId(v string) { 94 | o.ClientDeviceId = v 95 | } 96 | 97 | // GetIdentifierForVendor returns the IdentifierForVendor field value 98 | func (o *LoginRequest) GetIdentifierForVendor() string { 99 | if o == nil { 100 | var ret string 101 | return ret 102 | } 103 | 104 | return o.IdentifierForVendor 105 | } 106 | 107 | // GetIdentifierForVendorOk returns a tuple with the IdentifierForVendor field value 108 | // and a boolean to check if the value has been set. 109 | func (o *LoginRequest) GetIdentifierForVendorOk() (*string, bool) { 110 | if o == nil { 111 | return nil, false 112 | } 113 | return &o.IdentifierForVendor, true 114 | } 115 | 116 | // SetIdentifierForVendor sets field value 117 | func (o *LoginRequest) SetIdentifierForVendor(v string) { 118 | o.IdentifierForVendor = v 119 | } 120 | 121 | // GetLocale returns the Locale field value 122 | func (o *LoginRequest) GetLocale() string { 123 | if o == nil { 124 | var ret string 125 | return ret 126 | } 127 | 128 | return o.Locale 129 | } 130 | 131 | // GetLocaleOk returns a tuple with the Locale field value 132 | // and a boolean to check if the value has been set. 133 | func (o *LoginRequest) GetLocaleOk() (*string, bool) { 134 | if o == nil { 135 | return nil, false 136 | } 137 | return &o.Locale, true 138 | } 139 | 140 | // SetLocale sets field value 141 | func (o *LoginRequest) SetLocale(v string) { 142 | o.Locale = v 143 | } 144 | 145 | // GetUser returns the User field value 146 | func (o *LoginRequest) GetUser() LoginRequestUser { 147 | if o == nil { 148 | var ret LoginRequestUser 149 | return ret 150 | } 151 | 152 | return o.User 153 | } 154 | 155 | // GetUserOk returns a tuple with the User field value 156 | // and a boolean to check if the value has been set. 157 | func (o *LoginRequest) GetUserOk() (*LoginRequestUser, bool) { 158 | if o == nil { 159 | return nil, false 160 | } 161 | return &o.User, true 162 | } 163 | 164 | // SetUser sets field value 165 | func (o *LoginRequest) SetUser(v LoginRequestUser) { 166 | o.User = v 167 | } 168 | 169 | func (o LoginRequest) MarshalJSON() ([]byte, error) { 170 | toSerialize := map[string]interface{}{} 171 | if true { 172 | toSerialize["app_identifier"] = o.AppIdentifier 173 | } 174 | if true { 175 | toSerialize["client_device_id"] = o.ClientDeviceId 176 | } 177 | if true { 178 | toSerialize["identifier_for_vendor"] = o.IdentifierForVendor 179 | } 180 | if true { 181 | toSerialize["locale"] = o.Locale 182 | } 183 | if true { 184 | toSerialize["user"] = o.User 185 | } 186 | return json.Marshal(toSerialize) 187 | } 188 | 189 | type NullableLoginRequest struct { 190 | value *LoginRequest 191 | isSet bool 192 | } 193 | 194 | func (v NullableLoginRequest) Get() *LoginRequest { 195 | return v.value 196 | } 197 | 198 | func (v *NullableLoginRequest) Set(val *LoginRequest) { 199 | v.value = val 200 | v.isSet = true 201 | } 202 | 203 | func (v NullableLoginRequest) IsSet() bool { 204 | return v.isSet 205 | } 206 | 207 | func (v *NullableLoginRequest) Unset() { 208 | v.value = nil 209 | v.isSet = false 210 | } 211 | 212 | func NewNullableLoginRequest(val *LoginRequest) *NullableLoginRequest { 213 | return &NullableLoginRequest{value: val, isSet: true} 214 | } 215 | 216 | func (v NullableLoginRequest) MarshalJSON() ([]byte, error) { 217 | return json.Marshal(v.value) 218 | } 219 | 220 | func (v *NullableLoginRequest) UnmarshalJSON(src []byte) error { 221 | v.isSet = true 222 | return json.Unmarshal(src, &v.value) 223 | } 224 | 225 | 226 | -------------------------------------------------------------------------------- /auraframes/model_metadata.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // Metadata struct for Metadata 19 | type Metadata struct { 20 | Attribution *string `json:"attribution,omitempty"` 21 | Date *string `json:"date,omitempty"` 22 | Location *string `json:"location,omitempty"` 23 | PairReasons *string `json:"pair_reasons,omitempty"` 24 | } 25 | 26 | // NewMetadata instantiates a new Metadata object 27 | // This constructor will assign default values to properties that have it defined, 28 | // and makes sure properties required by API are set, but the set of arguments 29 | // will change when the set of required properties is changed 30 | func NewMetadata() *Metadata { 31 | this := Metadata{} 32 | return &this 33 | } 34 | 35 | // NewMetadataWithDefaults instantiates a new Metadata object 36 | // This constructor will only assign default values to properties that have it defined, 37 | // but it doesn't guarantee that properties required by API are set 38 | func NewMetadataWithDefaults() *Metadata { 39 | this := Metadata{} 40 | return &this 41 | } 42 | 43 | // GetAttribution returns the Attribution field value if set, zero value otherwise. 44 | func (o *Metadata) GetAttribution() string { 45 | if o == nil || o.Attribution == nil { 46 | var ret string 47 | return ret 48 | } 49 | return *o.Attribution 50 | } 51 | 52 | // GetAttributionOk returns a tuple with the Attribution field value if set, nil otherwise 53 | // and a boolean to check if the value has been set. 54 | func (o *Metadata) GetAttributionOk() (*string, bool) { 55 | if o == nil || o.Attribution == nil { 56 | return nil, false 57 | } 58 | return o.Attribution, true 59 | } 60 | 61 | // HasAttribution returns a boolean if a field has been set. 62 | func (o *Metadata) HasAttribution() bool { 63 | if o != nil && o.Attribution != nil { 64 | return true 65 | } 66 | 67 | return false 68 | } 69 | 70 | // SetAttribution gets a reference to the given string and assigns it to the Attribution field. 71 | func (o *Metadata) SetAttribution(v string) { 72 | o.Attribution = &v 73 | } 74 | 75 | // GetDate returns the Date field value if set, zero value otherwise. 76 | func (o *Metadata) GetDate() string { 77 | if o == nil || o.Date == nil { 78 | var ret string 79 | return ret 80 | } 81 | return *o.Date 82 | } 83 | 84 | // GetDateOk returns a tuple with the Date field value if set, nil otherwise 85 | // and a boolean to check if the value has been set. 86 | func (o *Metadata) GetDateOk() (*string, bool) { 87 | if o == nil || o.Date == nil { 88 | return nil, false 89 | } 90 | return o.Date, true 91 | } 92 | 93 | // HasDate returns a boolean if a field has been set. 94 | func (o *Metadata) HasDate() bool { 95 | if o != nil && o.Date != nil { 96 | return true 97 | } 98 | 99 | return false 100 | } 101 | 102 | // SetDate gets a reference to the given string and assigns it to the Date field. 103 | func (o *Metadata) SetDate(v string) { 104 | o.Date = &v 105 | } 106 | 107 | // GetLocation returns the Location field value if set, zero value otherwise. 108 | func (o *Metadata) GetLocation() string { 109 | if o == nil || o.Location == nil { 110 | var ret string 111 | return ret 112 | } 113 | return *o.Location 114 | } 115 | 116 | // GetLocationOk returns a tuple with the Location field value if set, nil otherwise 117 | // and a boolean to check if the value has been set. 118 | func (o *Metadata) GetLocationOk() (*string, bool) { 119 | if o == nil || o.Location == nil { 120 | return nil, false 121 | } 122 | return o.Location, true 123 | } 124 | 125 | // HasLocation returns a boolean if a field has been set. 126 | func (o *Metadata) HasLocation() bool { 127 | if o != nil && o.Location != nil { 128 | return true 129 | } 130 | 131 | return false 132 | } 133 | 134 | // SetLocation gets a reference to the given string and assigns it to the Location field. 135 | func (o *Metadata) SetLocation(v string) { 136 | o.Location = &v 137 | } 138 | 139 | // GetPairReasons returns the PairReasons field value if set, zero value otherwise. 140 | func (o *Metadata) GetPairReasons() string { 141 | if o == nil || o.PairReasons == nil { 142 | var ret string 143 | return ret 144 | } 145 | return *o.PairReasons 146 | } 147 | 148 | // GetPairReasonsOk returns a tuple with the PairReasons field value if set, nil otherwise 149 | // and a boolean to check if the value has been set. 150 | func (o *Metadata) GetPairReasonsOk() (*string, bool) { 151 | if o == nil || o.PairReasons == nil { 152 | return nil, false 153 | } 154 | return o.PairReasons, true 155 | } 156 | 157 | // HasPairReasons returns a boolean if a field has been set. 158 | func (o *Metadata) HasPairReasons() bool { 159 | if o != nil && o.PairReasons != nil { 160 | return true 161 | } 162 | 163 | return false 164 | } 165 | 166 | // SetPairReasons gets a reference to the given string and assigns it to the PairReasons field. 167 | func (o *Metadata) SetPairReasons(v string) { 168 | o.PairReasons = &v 169 | } 170 | 171 | func (o Metadata) MarshalJSON() ([]byte, error) { 172 | toSerialize := map[string]interface{}{} 173 | if o.Attribution != nil { 174 | toSerialize["attribution"] = o.Attribution 175 | } 176 | if o.Date != nil { 177 | toSerialize["date"] = o.Date 178 | } 179 | if o.Location != nil { 180 | toSerialize["location"] = o.Location 181 | } 182 | if o.PairReasons != nil { 183 | toSerialize["pair_reasons"] = o.PairReasons 184 | } 185 | return json.Marshal(toSerialize) 186 | } 187 | 188 | type NullableMetadata struct { 189 | value *Metadata 190 | isSet bool 191 | } 192 | 193 | func (v NullableMetadata) Get() *Metadata { 194 | return v.value 195 | } 196 | 197 | func (v *NullableMetadata) Set(val *Metadata) { 198 | v.value = val 199 | v.isSet = true 200 | } 201 | 202 | func (v NullableMetadata) IsSet() bool { 203 | return v.isSet 204 | } 205 | 206 | func (v *NullableMetadata) Unset() { 207 | v.value = nil 208 | v.isSet = false 209 | } 210 | 211 | func NewNullableMetadata(val *Metadata) *NullableMetadata { 212 | return &NullableMetadata{value: val, isSet: true} 213 | } 214 | 215 | func (v NullableMetadata) MarshalJSON() ([]byte, error) { 216 | return json.Marshal(v.value) 217 | } 218 | 219 | func (v *NullableMetadata) UnmarshalJSON(src []byte) error { 220 | v.isSet = true 221 | return json.Unmarshal(src, &v.value) 222 | } 223 | 224 | 225 | -------------------------------------------------------------------------------- /auraframes/docs/ContributorTokens.md: -------------------------------------------------------------------------------- 1 | # ContributorTokens 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Email** | Pointer to **string** | | [optional] 8 | **PhoneNumber** | Pointer to **string** | | [optional] 9 | **ExpiresAt** | Pointer to **string** | | [optional] 10 | **CreatedAt** | Pointer to **string** | | [optional] 11 | **UpdatedAt** | Pointer to **string** | | [optional] 12 | **FrameId** | Pointer to **string** | | [optional] 13 | **ContributorName** | Pointer to **string** | | [optional] 14 | 15 | ## Methods 16 | 17 | ### NewContributorTokens 18 | 19 | `func NewContributorTokens() *ContributorTokens` 20 | 21 | NewContributorTokens instantiates a new ContributorTokens object 22 | This constructor will assign default values to properties that have it defined, 23 | and makes sure properties required by API are set, but the set of arguments 24 | will change when the set of required properties is changed 25 | 26 | ### NewContributorTokensWithDefaults 27 | 28 | `func NewContributorTokensWithDefaults() *ContributorTokens` 29 | 30 | NewContributorTokensWithDefaults instantiates a new ContributorTokens object 31 | This constructor will only assign default values to properties that have it defined, 32 | but it doesn't guarantee that properties required by API are set 33 | 34 | ### GetEmail 35 | 36 | `func (o *ContributorTokens) GetEmail() string` 37 | 38 | GetEmail returns the Email field if non-nil, zero value otherwise. 39 | 40 | ### GetEmailOk 41 | 42 | `func (o *ContributorTokens) GetEmailOk() (*string, bool)` 43 | 44 | GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise 45 | and a boolean to check if the value has been set. 46 | 47 | ### SetEmail 48 | 49 | `func (o *ContributorTokens) SetEmail(v string)` 50 | 51 | SetEmail sets Email field to given value. 52 | 53 | ### HasEmail 54 | 55 | `func (o *ContributorTokens) HasEmail() bool` 56 | 57 | HasEmail returns a boolean if a field has been set. 58 | 59 | ### GetPhoneNumber 60 | 61 | `func (o *ContributorTokens) GetPhoneNumber() string` 62 | 63 | GetPhoneNumber returns the PhoneNumber field if non-nil, zero value otherwise. 64 | 65 | ### GetPhoneNumberOk 66 | 67 | `func (o *ContributorTokens) GetPhoneNumberOk() (*string, bool)` 68 | 69 | GetPhoneNumberOk returns a tuple with the PhoneNumber field if it's non-nil, zero value otherwise 70 | and a boolean to check if the value has been set. 71 | 72 | ### SetPhoneNumber 73 | 74 | `func (o *ContributorTokens) SetPhoneNumber(v string)` 75 | 76 | SetPhoneNumber sets PhoneNumber field to given value. 77 | 78 | ### HasPhoneNumber 79 | 80 | `func (o *ContributorTokens) HasPhoneNumber() bool` 81 | 82 | HasPhoneNumber returns a boolean if a field has been set. 83 | 84 | ### GetExpiresAt 85 | 86 | `func (o *ContributorTokens) GetExpiresAt() string` 87 | 88 | GetExpiresAt returns the ExpiresAt field if non-nil, zero value otherwise. 89 | 90 | ### GetExpiresAtOk 91 | 92 | `func (o *ContributorTokens) GetExpiresAtOk() (*string, bool)` 93 | 94 | GetExpiresAtOk returns a tuple with the ExpiresAt field if it's non-nil, zero value otherwise 95 | and a boolean to check if the value has been set. 96 | 97 | ### SetExpiresAt 98 | 99 | `func (o *ContributorTokens) SetExpiresAt(v string)` 100 | 101 | SetExpiresAt sets ExpiresAt field to given value. 102 | 103 | ### HasExpiresAt 104 | 105 | `func (o *ContributorTokens) HasExpiresAt() bool` 106 | 107 | HasExpiresAt returns a boolean if a field has been set. 108 | 109 | ### GetCreatedAt 110 | 111 | `func (o *ContributorTokens) GetCreatedAt() string` 112 | 113 | GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. 114 | 115 | ### GetCreatedAtOk 116 | 117 | `func (o *ContributorTokens) GetCreatedAtOk() (*string, bool)` 118 | 119 | GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise 120 | and a boolean to check if the value has been set. 121 | 122 | ### SetCreatedAt 123 | 124 | `func (o *ContributorTokens) SetCreatedAt(v string)` 125 | 126 | SetCreatedAt sets CreatedAt field to given value. 127 | 128 | ### HasCreatedAt 129 | 130 | `func (o *ContributorTokens) HasCreatedAt() bool` 131 | 132 | HasCreatedAt returns a boolean if a field has been set. 133 | 134 | ### GetUpdatedAt 135 | 136 | `func (o *ContributorTokens) GetUpdatedAt() string` 137 | 138 | GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. 139 | 140 | ### GetUpdatedAtOk 141 | 142 | `func (o *ContributorTokens) GetUpdatedAtOk() (*string, bool)` 143 | 144 | GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise 145 | and a boolean to check if the value has been set. 146 | 147 | ### SetUpdatedAt 148 | 149 | `func (o *ContributorTokens) SetUpdatedAt(v string)` 150 | 151 | SetUpdatedAt sets UpdatedAt field to given value. 152 | 153 | ### HasUpdatedAt 154 | 155 | `func (o *ContributorTokens) HasUpdatedAt() bool` 156 | 157 | HasUpdatedAt returns a boolean if a field has been set. 158 | 159 | ### GetFrameId 160 | 161 | `func (o *ContributorTokens) GetFrameId() string` 162 | 163 | GetFrameId returns the FrameId field if non-nil, zero value otherwise. 164 | 165 | ### GetFrameIdOk 166 | 167 | `func (o *ContributorTokens) GetFrameIdOk() (*string, bool)` 168 | 169 | GetFrameIdOk returns a tuple with the FrameId field if it's non-nil, zero value otherwise 170 | and a boolean to check if the value has been set. 171 | 172 | ### SetFrameId 173 | 174 | `func (o *ContributorTokens) SetFrameId(v string)` 175 | 176 | SetFrameId sets FrameId field to given value. 177 | 178 | ### HasFrameId 179 | 180 | `func (o *ContributorTokens) HasFrameId() bool` 181 | 182 | HasFrameId returns a boolean if a field has been set. 183 | 184 | ### GetContributorName 185 | 186 | `func (o *ContributorTokens) GetContributorName() string` 187 | 188 | GetContributorName returns the ContributorName field if non-nil, zero value otherwise. 189 | 190 | ### GetContributorNameOk 191 | 192 | `func (o *ContributorTokens) GetContributorNameOk() (*string, bool)` 193 | 194 | GetContributorNameOk returns a tuple with the ContributorName field if it's non-nil, zero value otherwise 195 | and a boolean to check if the value has been set. 196 | 197 | ### SetContributorName 198 | 199 | `func (o *ContributorTokens) SetContributorName(v string)` 200 | 201 | SetContributorName sets ContributorName field to given value. 202 | 203 | ### HasContributorName 204 | 205 | `func (o *ContributorTokens) HasContributorName() bool` 206 | 207 | HasContributorName returns a boolean if a field has been set. 208 | 209 | 210 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 211 | 212 | 213 | -------------------------------------------------------------------------------- /auraframes/utils.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | "time" 17 | ) 18 | 19 | // PtrBool is a helper routine that returns a pointer to given boolean value. 20 | func PtrBool(v bool) *bool { return &v } 21 | 22 | // PtrInt is a helper routine that returns a pointer to given integer value. 23 | func PtrInt(v int) *int { return &v } 24 | 25 | // PtrInt32 is a helper routine that returns a pointer to given integer value. 26 | func PtrInt32(v int32) *int32 { return &v } 27 | 28 | // PtrInt64 is a helper routine that returns a pointer to given integer value. 29 | func PtrInt64(v int64) *int64 { return &v } 30 | 31 | // PtrFloat32 is a helper routine that returns a pointer to given float value. 32 | func PtrFloat32(v float32) *float32 { return &v } 33 | 34 | // PtrFloat64 is a helper routine that returns a pointer to given float value. 35 | func PtrFloat64(v float64) *float64 { return &v } 36 | 37 | // PtrString is a helper routine that returns a pointer to given string value. 38 | func PtrString(v string) *string { return &v } 39 | 40 | // PtrTime is helper routine that returns a pointer to given Time value. 41 | func PtrTime(v time.Time) *time.Time { return &v } 42 | 43 | type NullableBool struct { 44 | value *bool 45 | isSet bool 46 | } 47 | 48 | func (v NullableBool) Get() *bool { 49 | return v.value 50 | } 51 | 52 | func (v *NullableBool) Set(val *bool) { 53 | v.value = val 54 | v.isSet = true 55 | } 56 | 57 | func (v NullableBool) IsSet() bool { 58 | return v.isSet 59 | } 60 | 61 | func (v *NullableBool) Unset() { 62 | v.value = nil 63 | v.isSet = false 64 | } 65 | 66 | func NewNullableBool(val *bool) *NullableBool { 67 | return &NullableBool{value: val, isSet: true} 68 | } 69 | 70 | func (v NullableBool) MarshalJSON() ([]byte, error) { 71 | return json.Marshal(v.value) 72 | } 73 | 74 | func (v *NullableBool) UnmarshalJSON(src []byte) error { 75 | v.isSet = true 76 | return json.Unmarshal(src, &v.value) 77 | } 78 | 79 | type NullableInt struct { 80 | value *int 81 | isSet bool 82 | } 83 | 84 | func (v NullableInt) Get() *int { 85 | return v.value 86 | } 87 | 88 | func (v *NullableInt) Set(val *int) { 89 | v.value = val 90 | v.isSet = true 91 | } 92 | 93 | func (v NullableInt) IsSet() bool { 94 | return v.isSet 95 | } 96 | 97 | func (v *NullableInt) Unset() { 98 | v.value = nil 99 | v.isSet = false 100 | } 101 | 102 | func NewNullableInt(val *int) *NullableInt { 103 | return &NullableInt{value: val, isSet: true} 104 | } 105 | 106 | func (v NullableInt) MarshalJSON() ([]byte, error) { 107 | return json.Marshal(v.value) 108 | } 109 | 110 | func (v *NullableInt) UnmarshalJSON(src []byte) error { 111 | v.isSet = true 112 | return json.Unmarshal(src, &v.value) 113 | } 114 | 115 | type NullableInt32 struct { 116 | value *int32 117 | isSet bool 118 | } 119 | 120 | func (v NullableInt32) Get() *int32 { 121 | return v.value 122 | } 123 | 124 | func (v *NullableInt32) Set(val *int32) { 125 | v.value = val 126 | v.isSet = true 127 | } 128 | 129 | func (v NullableInt32) IsSet() bool { 130 | return v.isSet 131 | } 132 | 133 | func (v *NullableInt32) Unset() { 134 | v.value = nil 135 | v.isSet = false 136 | } 137 | 138 | func NewNullableInt32(val *int32) *NullableInt32 { 139 | return &NullableInt32{value: val, isSet: true} 140 | } 141 | 142 | func (v NullableInt32) MarshalJSON() ([]byte, error) { 143 | return json.Marshal(v.value) 144 | } 145 | 146 | func (v *NullableInt32) UnmarshalJSON(src []byte) error { 147 | v.isSet = true 148 | return json.Unmarshal(src, &v.value) 149 | } 150 | 151 | type NullableInt64 struct { 152 | value *int64 153 | isSet bool 154 | } 155 | 156 | func (v NullableInt64) Get() *int64 { 157 | return v.value 158 | } 159 | 160 | func (v *NullableInt64) Set(val *int64) { 161 | v.value = val 162 | v.isSet = true 163 | } 164 | 165 | func (v NullableInt64) IsSet() bool { 166 | return v.isSet 167 | } 168 | 169 | func (v *NullableInt64) Unset() { 170 | v.value = nil 171 | v.isSet = false 172 | } 173 | 174 | func NewNullableInt64(val *int64) *NullableInt64 { 175 | return &NullableInt64{value: val, isSet: true} 176 | } 177 | 178 | func (v NullableInt64) MarshalJSON() ([]byte, error) { 179 | return json.Marshal(v.value) 180 | } 181 | 182 | func (v *NullableInt64) UnmarshalJSON(src []byte) error { 183 | v.isSet = true 184 | return json.Unmarshal(src, &v.value) 185 | } 186 | 187 | type NullableFloat32 struct { 188 | value *float32 189 | isSet bool 190 | } 191 | 192 | func (v NullableFloat32) Get() *float32 { 193 | return v.value 194 | } 195 | 196 | func (v *NullableFloat32) Set(val *float32) { 197 | v.value = val 198 | v.isSet = true 199 | } 200 | 201 | func (v NullableFloat32) IsSet() bool { 202 | return v.isSet 203 | } 204 | 205 | func (v *NullableFloat32) Unset() { 206 | v.value = nil 207 | v.isSet = false 208 | } 209 | 210 | func NewNullableFloat32(val *float32) *NullableFloat32 { 211 | return &NullableFloat32{value: val, isSet: true} 212 | } 213 | 214 | func (v NullableFloat32) MarshalJSON() ([]byte, error) { 215 | return json.Marshal(v.value) 216 | } 217 | 218 | func (v *NullableFloat32) UnmarshalJSON(src []byte) error { 219 | v.isSet = true 220 | return json.Unmarshal(src, &v.value) 221 | } 222 | 223 | type NullableFloat64 struct { 224 | value *float64 225 | isSet bool 226 | } 227 | 228 | func (v NullableFloat64) Get() *float64 { 229 | return v.value 230 | } 231 | 232 | func (v *NullableFloat64) Set(val *float64) { 233 | v.value = val 234 | v.isSet = true 235 | } 236 | 237 | func (v NullableFloat64) IsSet() bool { 238 | return v.isSet 239 | } 240 | 241 | func (v *NullableFloat64) Unset() { 242 | v.value = nil 243 | v.isSet = false 244 | } 245 | 246 | func NewNullableFloat64(val *float64) *NullableFloat64 { 247 | return &NullableFloat64{value: val, isSet: true} 248 | } 249 | 250 | func (v NullableFloat64) MarshalJSON() ([]byte, error) { 251 | return json.Marshal(v.value) 252 | } 253 | 254 | func (v *NullableFloat64) UnmarshalJSON(src []byte) error { 255 | v.isSet = true 256 | return json.Unmarshal(src, &v.value) 257 | } 258 | 259 | type NullableString struct { 260 | value *string 261 | isSet bool 262 | } 263 | 264 | func (v NullableString) Get() *string { 265 | return v.value 266 | } 267 | 268 | func (v *NullableString) Set(val *string) { 269 | v.value = val 270 | v.isSet = true 271 | } 272 | 273 | func (v NullableString) IsSet() bool { 274 | return v.isSet 275 | } 276 | 277 | func (v *NullableString) Unset() { 278 | v.value = nil 279 | v.isSet = false 280 | } 281 | 282 | func NewNullableString(val *string) *NullableString { 283 | return &NullableString{value: val, isSet: true} 284 | } 285 | 286 | func (v NullableString) MarshalJSON() ([]byte, error) { 287 | return json.Marshal(v.value) 288 | } 289 | 290 | func (v *NullableString) UnmarshalJSON(src []byte) error { 291 | v.isSet = true 292 | return json.Unmarshal(src, &v.value) 293 | } 294 | 295 | type NullableTime struct { 296 | value *time.Time 297 | isSet bool 298 | } 299 | 300 | func (v NullableTime) Get() *time.Time { 301 | return v.value 302 | } 303 | 304 | func (v *NullableTime) Set(val *time.Time) { 305 | v.value = val 306 | v.isSet = true 307 | } 308 | 309 | func (v NullableTime) IsSet() bool { 310 | return v.isSet 311 | } 312 | 313 | func (v *NullableTime) Unset() { 314 | v.value = nil 315 | v.isSet = false 316 | } 317 | 318 | func NewNullableTime(val *time.Time) *NullableTime { 319 | return &NullableTime{value: val, isSet: true} 320 | } 321 | 322 | func (v NullableTime) MarshalJSON() ([]byte, error) { 323 | return v.value.MarshalJSON() 324 | } 325 | 326 | func (v *NullableTime) UnmarshalJSON(src []byte) error { 327 | v.isSet = true 328 | return json.Unmarshal(src, &v.value) 329 | } 330 | -------------------------------------------------------------------------------- /auraframes/model_frame_environment.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // FrameEnvironment struct for FrameEnvironment 19 | type FrameEnvironment struct { 20 | Id *string `json:"id,omitempty"` 21 | FrameId *string `json:"frame_id,omitempty"` 22 | LastOnlineAt *string `json:"last_online_at,omitempty"` 23 | CreatedAt *string `json:"created_at,omitempty"` 24 | UpdatedAt *string `json:"updated_at,omitempty"` 25 | } 26 | 27 | // NewFrameEnvironment instantiates a new FrameEnvironment object 28 | // This constructor will assign default values to properties that have it defined, 29 | // and makes sure properties required by API are set, but the set of arguments 30 | // will change when the set of required properties is changed 31 | func NewFrameEnvironment() *FrameEnvironment { 32 | this := FrameEnvironment{} 33 | return &this 34 | } 35 | 36 | // NewFrameEnvironmentWithDefaults instantiates a new FrameEnvironment object 37 | // This constructor will only assign default values to properties that have it defined, 38 | // but it doesn't guarantee that properties required by API are set 39 | func NewFrameEnvironmentWithDefaults() *FrameEnvironment { 40 | this := FrameEnvironment{} 41 | return &this 42 | } 43 | 44 | // GetId returns the Id field value if set, zero value otherwise. 45 | func (o *FrameEnvironment) GetId() string { 46 | if o == nil || o.Id == nil { 47 | var ret string 48 | return ret 49 | } 50 | return *o.Id 51 | } 52 | 53 | // GetIdOk returns a tuple with the Id field value if set, nil otherwise 54 | // and a boolean to check if the value has been set. 55 | func (o *FrameEnvironment) GetIdOk() (*string, bool) { 56 | if o == nil || o.Id == nil { 57 | return nil, false 58 | } 59 | return o.Id, true 60 | } 61 | 62 | // HasId returns a boolean if a field has been set. 63 | func (o *FrameEnvironment) HasId() bool { 64 | if o != nil && o.Id != nil { 65 | return true 66 | } 67 | 68 | return false 69 | } 70 | 71 | // SetId gets a reference to the given string and assigns it to the Id field. 72 | func (o *FrameEnvironment) SetId(v string) { 73 | o.Id = &v 74 | } 75 | 76 | // GetFrameId returns the FrameId field value if set, zero value otherwise. 77 | func (o *FrameEnvironment) GetFrameId() string { 78 | if o == nil || o.FrameId == nil { 79 | var ret string 80 | return ret 81 | } 82 | return *o.FrameId 83 | } 84 | 85 | // GetFrameIdOk returns a tuple with the FrameId field value if set, nil otherwise 86 | // and a boolean to check if the value has been set. 87 | func (o *FrameEnvironment) GetFrameIdOk() (*string, bool) { 88 | if o == nil || o.FrameId == nil { 89 | return nil, false 90 | } 91 | return o.FrameId, true 92 | } 93 | 94 | // HasFrameId returns a boolean if a field has been set. 95 | func (o *FrameEnvironment) HasFrameId() bool { 96 | if o != nil && o.FrameId != nil { 97 | return true 98 | } 99 | 100 | return false 101 | } 102 | 103 | // SetFrameId gets a reference to the given string and assigns it to the FrameId field. 104 | func (o *FrameEnvironment) SetFrameId(v string) { 105 | o.FrameId = &v 106 | } 107 | 108 | // GetLastOnlineAt returns the LastOnlineAt field value if set, zero value otherwise. 109 | func (o *FrameEnvironment) GetLastOnlineAt() string { 110 | if o == nil || o.LastOnlineAt == nil { 111 | var ret string 112 | return ret 113 | } 114 | return *o.LastOnlineAt 115 | } 116 | 117 | // GetLastOnlineAtOk returns a tuple with the LastOnlineAt field value if set, nil otherwise 118 | // and a boolean to check if the value has been set. 119 | func (o *FrameEnvironment) GetLastOnlineAtOk() (*string, bool) { 120 | if o == nil || o.LastOnlineAt == nil { 121 | return nil, false 122 | } 123 | return o.LastOnlineAt, true 124 | } 125 | 126 | // HasLastOnlineAt returns a boolean if a field has been set. 127 | func (o *FrameEnvironment) HasLastOnlineAt() bool { 128 | if o != nil && o.LastOnlineAt != nil { 129 | return true 130 | } 131 | 132 | return false 133 | } 134 | 135 | // SetLastOnlineAt gets a reference to the given string and assigns it to the LastOnlineAt field. 136 | func (o *FrameEnvironment) SetLastOnlineAt(v string) { 137 | o.LastOnlineAt = &v 138 | } 139 | 140 | // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. 141 | func (o *FrameEnvironment) GetCreatedAt() string { 142 | if o == nil || o.CreatedAt == nil { 143 | var ret string 144 | return ret 145 | } 146 | return *o.CreatedAt 147 | } 148 | 149 | // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise 150 | // and a boolean to check if the value has been set. 151 | func (o *FrameEnvironment) GetCreatedAtOk() (*string, bool) { 152 | if o == nil || o.CreatedAt == nil { 153 | return nil, false 154 | } 155 | return o.CreatedAt, true 156 | } 157 | 158 | // HasCreatedAt returns a boolean if a field has been set. 159 | func (o *FrameEnvironment) HasCreatedAt() bool { 160 | if o != nil && o.CreatedAt != nil { 161 | return true 162 | } 163 | 164 | return false 165 | } 166 | 167 | // SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. 168 | func (o *FrameEnvironment) SetCreatedAt(v string) { 169 | o.CreatedAt = &v 170 | } 171 | 172 | // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. 173 | func (o *FrameEnvironment) GetUpdatedAt() string { 174 | if o == nil || o.UpdatedAt == nil { 175 | var ret string 176 | return ret 177 | } 178 | return *o.UpdatedAt 179 | } 180 | 181 | // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise 182 | // and a boolean to check if the value has been set. 183 | func (o *FrameEnvironment) GetUpdatedAtOk() (*string, bool) { 184 | if o == nil || o.UpdatedAt == nil { 185 | return nil, false 186 | } 187 | return o.UpdatedAt, true 188 | } 189 | 190 | // HasUpdatedAt returns a boolean if a field has been set. 191 | func (o *FrameEnvironment) HasUpdatedAt() bool { 192 | if o != nil && o.UpdatedAt != nil { 193 | return true 194 | } 195 | 196 | return false 197 | } 198 | 199 | // SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. 200 | func (o *FrameEnvironment) SetUpdatedAt(v string) { 201 | o.UpdatedAt = &v 202 | } 203 | 204 | func (o FrameEnvironment) MarshalJSON() ([]byte, error) { 205 | toSerialize := map[string]interface{}{} 206 | if o.Id != nil { 207 | toSerialize["id"] = o.Id 208 | } 209 | if o.FrameId != nil { 210 | toSerialize["frame_id"] = o.FrameId 211 | } 212 | if o.LastOnlineAt != nil { 213 | toSerialize["last_online_at"] = o.LastOnlineAt 214 | } 215 | if o.CreatedAt != nil { 216 | toSerialize["created_at"] = o.CreatedAt 217 | } 218 | if o.UpdatedAt != nil { 219 | toSerialize["updated_at"] = o.UpdatedAt 220 | } 221 | return json.Marshal(toSerialize) 222 | } 223 | 224 | type NullableFrameEnvironment struct { 225 | value *FrameEnvironment 226 | isSet bool 227 | } 228 | 229 | func (v NullableFrameEnvironment) Get() *FrameEnvironment { 230 | return v.value 231 | } 232 | 233 | func (v *NullableFrameEnvironment) Set(val *FrameEnvironment) { 234 | v.value = val 235 | v.isSet = true 236 | } 237 | 238 | func (v NullableFrameEnvironment) IsSet() bool { 239 | return v.isSet 240 | } 241 | 242 | func (v *NullableFrameEnvironment) Unset() { 243 | v.value = nil 244 | v.isSet = false 245 | } 246 | 247 | func NewNullableFrameEnvironment(val *FrameEnvironment) *NullableFrameEnvironment { 248 | return &NullableFrameEnvironment{value: val, isSet: true} 249 | } 250 | 251 | func (v NullableFrameEnvironment) MarshalJSON() ([]byte, error) { 252 | return json.Marshal(v.value) 253 | } 254 | 255 | func (v *NullableFrameEnvironment) UnmarshalJSON(src []byte) error { 256 | v.isSet = true 257 | return json.Unmarshal(src, &v.value) 258 | } 259 | 260 | 261 | -------------------------------------------------------------------------------- /auraframes/configuration.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "context" 16 | "fmt" 17 | "net/http" 18 | "strings" 19 | ) 20 | 21 | // contextKeys are used to identify the type of value in the context. 22 | // Since these are string, it is possible to get a short description of the 23 | // context key for logging and debugging using key.String(). 24 | 25 | type contextKey string 26 | 27 | func (c contextKey) String() string { 28 | return "auth " + string(c) 29 | } 30 | 31 | var ( 32 | // ContextOAuth2 takes an oauth2.TokenSource as authentication for the request. 33 | ContextOAuth2 = contextKey("token") 34 | 35 | // ContextBasicAuth takes BasicAuth as authentication for the request. 36 | ContextBasicAuth = contextKey("basic") 37 | 38 | // ContextAccessToken takes a string oauth2 access token as authentication for the request. 39 | ContextAccessToken = contextKey("accesstoken") 40 | 41 | // ContextAPIKeys takes a string apikey as authentication for the request 42 | ContextAPIKeys = contextKey("apiKeys") 43 | 44 | // ContextHttpSignatureAuth takes HttpSignatureAuth as authentication for the request. 45 | ContextHttpSignatureAuth = contextKey("httpsignature") 46 | 47 | // ContextServerIndex uses a server configuration from the index. 48 | ContextServerIndex = contextKey("serverIndex") 49 | 50 | // ContextOperationServerIndices uses a server configuration from the index mapping. 51 | ContextOperationServerIndices = contextKey("serverOperationIndices") 52 | 53 | // ContextServerVariables overrides a server configuration variables. 54 | ContextServerVariables = contextKey("serverVariables") 55 | 56 | // ContextOperationServerVariables overrides a server configuration variables using operation specific values. 57 | ContextOperationServerVariables = contextKey("serverOperationVariables") 58 | ) 59 | 60 | // BasicAuth provides basic http authentication to a request passed via context using ContextBasicAuth 61 | type BasicAuth struct { 62 | UserName string `json:"userName,omitempty"` 63 | Password string `json:"password,omitempty"` 64 | } 65 | 66 | // APIKey provides API key based authentication to a request passed via context using ContextAPIKey 67 | type APIKey struct { 68 | Key string 69 | Prefix string 70 | } 71 | 72 | // ServerVariable stores the information about a server variable 73 | type ServerVariable struct { 74 | Description string 75 | DefaultValue string 76 | EnumValues []string 77 | } 78 | 79 | // ServerConfiguration stores the information about a server 80 | type ServerConfiguration struct { 81 | URL string 82 | Description string 83 | Variables map[string]ServerVariable 84 | } 85 | 86 | // ServerConfigurations stores multiple ServerConfiguration items 87 | type ServerConfigurations []ServerConfiguration 88 | 89 | // Configuration stores the configuration of the API client 90 | type Configuration struct { 91 | Host string `json:"host,omitempty"` 92 | Scheme string `json:"scheme,omitempty"` 93 | DefaultHeader map[string]string `json:"defaultHeader,omitempty"` 94 | UserAgent string `json:"userAgent,omitempty"` 95 | Debug bool `json:"debug,omitempty"` 96 | Servers ServerConfigurations 97 | OperationServers map[string]ServerConfigurations 98 | HTTPClient *http.Client 99 | } 100 | 101 | // NewConfiguration returns a new Configuration object 102 | func NewConfiguration() *Configuration { 103 | cfg := &Configuration{ 104 | DefaultHeader: make(map[string]string), 105 | UserAgent: "OpenAPI-Generator/1.0.0/go", 106 | Debug: false, 107 | Servers: ServerConfigurations{ 108 | { 109 | URL: "https://api.pushd.com/v5", 110 | Description: "No description provided", 111 | }, 112 | }, 113 | OperationServers: map[string]ServerConfigurations{ 114 | }, 115 | } 116 | return cfg 117 | } 118 | 119 | // AddDefaultHeader adds a new HTTP header to the default header in the request 120 | func (c *Configuration) AddDefaultHeader(key string, value string) { 121 | c.DefaultHeader[key] = value 122 | } 123 | 124 | // URL formats template on a index using given variables 125 | func (sc ServerConfigurations) URL(index int, variables map[string]string) (string, error) { 126 | if index < 0 || len(sc) <= index { 127 | return "", fmt.Errorf("Index %v out of range %v", index, len(sc)-1) 128 | } 129 | server := sc[index] 130 | url := server.URL 131 | 132 | // go through variables and replace placeholders 133 | for name, variable := range server.Variables { 134 | if value, ok := variables[name]; ok { 135 | found := bool(len(variable.EnumValues) == 0) 136 | for _, enumValue := range variable.EnumValues { 137 | if value == enumValue { 138 | found = true 139 | } 140 | } 141 | if !found { 142 | return "", fmt.Errorf("The variable %s in the server URL has invalid value %v. Must be %v", name, value, variable.EnumValues) 143 | } 144 | url = strings.Replace(url, "{"+name+"}", value, -1) 145 | } else { 146 | url = strings.Replace(url, "{"+name+"}", variable.DefaultValue, -1) 147 | } 148 | } 149 | return url, nil 150 | } 151 | 152 | // ServerURL returns URL based on server settings 153 | func (c *Configuration) ServerURL(index int, variables map[string]string) (string, error) { 154 | return c.Servers.URL(index, variables) 155 | } 156 | 157 | func getServerIndex(ctx context.Context) (int, error) { 158 | si := ctx.Value(ContextServerIndex) 159 | if si != nil { 160 | if index, ok := si.(int); ok { 161 | return index, nil 162 | } 163 | return 0, reportError("Invalid type %T should be int", si) 164 | } 165 | return 0, nil 166 | } 167 | 168 | func getServerOperationIndex(ctx context.Context, endpoint string) (int, error) { 169 | osi := ctx.Value(ContextOperationServerIndices) 170 | if osi != nil { 171 | if operationIndices, ok := osi.(map[string]int); !ok { 172 | return 0, reportError("Invalid type %T should be map[string]int", osi) 173 | } else { 174 | index, ok := operationIndices[endpoint] 175 | if ok { 176 | return index, nil 177 | } 178 | } 179 | } 180 | return getServerIndex(ctx) 181 | } 182 | 183 | func getServerVariables(ctx context.Context) (map[string]string, error) { 184 | sv := ctx.Value(ContextServerVariables) 185 | if sv != nil { 186 | if variables, ok := sv.(map[string]string); ok { 187 | return variables, nil 188 | } 189 | return nil, reportError("ctx value of ContextServerVariables has invalid type %T should be map[string]string", sv) 190 | } 191 | return nil, nil 192 | } 193 | 194 | func getServerOperationVariables(ctx context.Context, endpoint string) (map[string]string, error) { 195 | osv := ctx.Value(ContextOperationServerVariables) 196 | if osv != nil { 197 | if operationVariables, ok := osv.(map[string]map[string]string); !ok { 198 | return nil, reportError("ctx value of ContextOperationServerVariables has invalid type %T should be map[string]map[string]string", osv) 199 | } else { 200 | variables, ok := operationVariables[endpoint] 201 | if ok { 202 | return variables, nil 203 | } 204 | } 205 | } 206 | return getServerVariables(ctx) 207 | } 208 | 209 | // ServerURLWithContext returns a new server URL given an endpoint 210 | func (c *Configuration) ServerURLWithContext(ctx context.Context, endpoint string) (string, error) { 211 | sc, ok := c.OperationServers[endpoint] 212 | if !ok { 213 | sc = c.Servers 214 | } 215 | 216 | if ctx == nil { 217 | return sc.URL(0, nil) 218 | } 219 | 220 | index, err := getServerOperationIndex(ctx, endpoint) 221 | if err != nil { 222 | return "", err 223 | } 224 | 225 | variables, err := getServerOperationVariables(ctx, endpoint) 226 | if err != nil { 227 | return "", err 228 | } 229 | 230 | return sc.URL(index, variables) 231 | } 232 | -------------------------------------------------------------------------------- /auraframes/docs/User.md: -------------------------------------------------------------------------------- 1 | # User 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **Id** | Pointer to **string** | | [optional] 8 | **ShortId** | Pointer to **string** | | [optional] 9 | **TestAccount** | Pointer to **string** | | [optional] 10 | **CreatedAt** | Pointer to **string** | | [optional] 11 | **UpdatedAt** | Pointer to **string** | | [optional] 12 | **LatestAppVersion** | Pointer to **string** | | [optional] 13 | **Name** | Pointer to **string** | | [optional] 14 | **Email** | Pointer to **string** | | [optional] 15 | **AttributionId** | Pointer to **string** | | [optional] 16 | **AttributionString** | Pointer to **string** | | [optional] 17 | **ShowPushPrompt** | Pointer to **bool** | | [optional] 18 | **AvatarFileName** | Pointer to **string** | | [optional] 19 | 20 | ## Methods 21 | 22 | ### NewUser 23 | 24 | `func NewUser() *User` 25 | 26 | NewUser instantiates a new User object 27 | This constructor will assign default values to properties that have it defined, 28 | and makes sure properties required by API are set, but the set of arguments 29 | will change when the set of required properties is changed 30 | 31 | ### NewUserWithDefaults 32 | 33 | `func NewUserWithDefaults() *User` 34 | 35 | NewUserWithDefaults instantiates a new User object 36 | This constructor will only assign default values to properties that have it defined, 37 | but it doesn't guarantee that properties required by API are set 38 | 39 | ### GetId 40 | 41 | `func (o *User) GetId() string` 42 | 43 | GetId returns the Id field if non-nil, zero value otherwise. 44 | 45 | ### GetIdOk 46 | 47 | `func (o *User) GetIdOk() (*string, bool)` 48 | 49 | GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise 50 | and a boolean to check if the value has been set. 51 | 52 | ### SetId 53 | 54 | `func (o *User) SetId(v string)` 55 | 56 | SetId sets Id field to given value. 57 | 58 | ### HasId 59 | 60 | `func (o *User) HasId() bool` 61 | 62 | HasId returns a boolean if a field has been set. 63 | 64 | ### GetShortId 65 | 66 | `func (o *User) GetShortId() string` 67 | 68 | GetShortId returns the ShortId field if non-nil, zero value otherwise. 69 | 70 | ### GetShortIdOk 71 | 72 | `func (o *User) GetShortIdOk() (*string, bool)` 73 | 74 | GetShortIdOk returns a tuple with the ShortId field if it's non-nil, zero value otherwise 75 | and a boolean to check if the value has been set. 76 | 77 | ### SetShortId 78 | 79 | `func (o *User) SetShortId(v string)` 80 | 81 | SetShortId sets ShortId field to given value. 82 | 83 | ### HasShortId 84 | 85 | `func (o *User) HasShortId() bool` 86 | 87 | HasShortId returns a boolean if a field has been set. 88 | 89 | ### GetTestAccount 90 | 91 | `func (o *User) GetTestAccount() string` 92 | 93 | GetTestAccount returns the TestAccount field if non-nil, zero value otherwise. 94 | 95 | ### GetTestAccountOk 96 | 97 | `func (o *User) GetTestAccountOk() (*string, bool)` 98 | 99 | GetTestAccountOk returns a tuple with the TestAccount field if it's non-nil, zero value otherwise 100 | and a boolean to check if the value has been set. 101 | 102 | ### SetTestAccount 103 | 104 | `func (o *User) SetTestAccount(v string)` 105 | 106 | SetTestAccount sets TestAccount field to given value. 107 | 108 | ### HasTestAccount 109 | 110 | `func (o *User) HasTestAccount() bool` 111 | 112 | HasTestAccount returns a boolean if a field has been set. 113 | 114 | ### GetCreatedAt 115 | 116 | `func (o *User) GetCreatedAt() string` 117 | 118 | GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. 119 | 120 | ### GetCreatedAtOk 121 | 122 | `func (o *User) GetCreatedAtOk() (*string, bool)` 123 | 124 | GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise 125 | and a boolean to check if the value has been set. 126 | 127 | ### SetCreatedAt 128 | 129 | `func (o *User) SetCreatedAt(v string)` 130 | 131 | SetCreatedAt sets CreatedAt field to given value. 132 | 133 | ### HasCreatedAt 134 | 135 | `func (o *User) HasCreatedAt() bool` 136 | 137 | HasCreatedAt returns a boolean if a field has been set. 138 | 139 | ### GetUpdatedAt 140 | 141 | `func (o *User) GetUpdatedAt() string` 142 | 143 | GetUpdatedAt returns the UpdatedAt field if non-nil, zero value otherwise. 144 | 145 | ### GetUpdatedAtOk 146 | 147 | `func (o *User) GetUpdatedAtOk() (*string, bool)` 148 | 149 | GetUpdatedAtOk returns a tuple with the UpdatedAt field if it's non-nil, zero value otherwise 150 | and a boolean to check if the value has been set. 151 | 152 | ### SetUpdatedAt 153 | 154 | `func (o *User) SetUpdatedAt(v string)` 155 | 156 | SetUpdatedAt sets UpdatedAt field to given value. 157 | 158 | ### HasUpdatedAt 159 | 160 | `func (o *User) HasUpdatedAt() bool` 161 | 162 | HasUpdatedAt returns a boolean if a field has been set. 163 | 164 | ### GetLatestAppVersion 165 | 166 | `func (o *User) GetLatestAppVersion() string` 167 | 168 | GetLatestAppVersion returns the LatestAppVersion field if non-nil, zero value otherwise. 169 | 170 | ### GetLatestAppVersionOk 171 | 172 | `func (o *User) GetLatestAppVersionOk() (*string, bool)` 173 | 174 | GetLatestAppVersionOk returns a tuple with the LatestAppVersion field if it's non-nil, zero value otherwise 175 | and a boolean to check if the value has been set. 176 | 177 | ### SetLatestAppVersion 178 | 179 | `func (o *User) SetLatestAppVersion(v string)` 180 | 181 | SetLatestAppVersion sets LatestAppVersion field to given value. 182 | 183 | ### HasLatestAppVersion 184 | 185 | `func (o *User) HasLatestAppVersion() bool` 186 | 187 | HasLatestAppVersion returns a boolean if a field has been set. 188 | 189 | ### GetName 190 | 191 | `func (o *User) GetName() string` 192 | 193 | GetName returns the Name field if non-nil, zero value otherwise. 194 | 195 | ### GetNameOk 196 | 197 | `func (o *User) GetNameOk() (*string, bool)` 198 | 199 | GetNameOk returns a tuple with the Name field if it's non-nil, zero value otherwise 200 | and a boolean to check if the value has been set. 201 | 202 | ### SetName 203 | 204 | `func (o *User) SetName(v string)` 205 | 206 | SetName sets Name field to given value. 207 | 208 | ### HasName 209 | 210 | `func (o *User) HasName() bool` 211 | 212 | HasName returns a boolean if a field has been set. 213 | 214 | ### GetEmail 215 | 216 | `func (o *User) GetEmail() string` 217 | 218 | GetEmail returns the Email field if non-nil, zero value otherwise. 219 | 220 | ### GetEmailOk 221 | 222 | `func (o *User) GetEmailOk() (*string, bool)` 223 | 224 | GetEmailOk returns a tuple with the Email field if it's non-nil, zero value otherwise 225 | and a boolean to check if the value has been set. 226 | 227 | ### SetEmail 228 | 229 | `func (o *User) SetEmail(v string)` 230 | 231 | SetEmail sets Email field to given value. 232 | 233 | ### HasEmail 234 | 235 | `func (o *User) HasEmail() bool` 236 | 237 | HasEmail returns a boolean if a field has been set. 238 | 239 | ### GetAttributionId 240 | 241 | `func (o *User) GetAttributionId() string` 242 | 243 | GetAttributionId returns the AttributionId field if non-nil, zero value otherwise. 244 | 245 | ### GetAttributionIdOk 246 | 247 | `func (o *User) GetAttributionIdOk() (*string, bool)` 248 | 249 | GetAttributionIdOk returns a tuple with the AttributionId field if it's non-nil, zero value otherwise 250 | and a boolean to check if the value has been set. 251 | 252 | ### SetAttributionId 253 | 254 | `func (o *User) SetAttributionId(v string)` 255 | 256 | SetAttributionId sets AttributionId field to given value. 257 | 258 | ### HasAttributionId 259 | 260 | `func (o *User) HasAttributionId() bool` 261 | 262 | HasAttributionId returns a boolean if a field has been set. 263 | 264 | ### GetAttributionString 265 | 266 | `func (o *User) GetAttributionString() string` 267 | 268 | GetAttributionString returns the AttributionString field if non-nil, zero value otherwise. 269 | 270 | ### GetAttributionStringOk 271 | 272 | `func (o *User) GetAttributionStringOk() (*string, bool)` 273 | 274 | GetAttributionStringOk returns a tuple with the AttributionString field if it's non-nil, zero value otherwise 275 | and a boolean to check if the value has been set. 276 | 277 | ### SetAttributionString 278 | 279 | `func (o *User) SetAttributionString(v string)` 280 | 281 | SetAttributionString sets AttributionString field to given value. 282 | 283 | ### HasAttributionString 284 | 285 | `func (o *User) HasAttributionString() bool` 286 | 287 | HasAttributionString returns a boolean if a field has been set. 288 | 289 | ### GetShowPushPrompt 290 | 291 | `func (o *User) GetShowPushPrompt() bool` 292 | 293 | GetShowPushPrompt returns the ShowPushPrompt field if non-nil, zero value otherwise. 294 | 295 | ### GetShowPushPromptOk 296 | 297 | `func (o *User) GetShowPushPromptOk() (*bool, bool)` 298 | 299 | GetShowPushPromptOk returns a tuple with the ShowPushPrompt field if it's non-nil, zero value otherwise 300 | and a boolean to check if the value has been set. 301 | 302 | ### SetShowPushPrompt 303 | 304 | `func (o *User) SetShowPushPrompt(v bool)` 305 | 306 | SetShowPushPrompt sets ShowPushPrompt field to given value. 307 | 308 | ### HasShowPushPrompt 309 | 310 | `func (o *User) HasShowPushPrompt() bool` 311 | 312 | HasShowPushPrompt returns a boolean if a field has been set. 313 | 314 | ### GetAvatarFileName 315 | 316 | `func (o *User) GetAvatarFileName() string` 317 | 318 | GetAvatarFileName returns the AvatarFileName field if non-nil, zero value otherwise. 319 | 320 | ### GetAvatarFileNameOk 321 | 322 | `func (o *User) GetAvatarFileNameOk() (*string, bool)` 323 | 324 | GetAvatarFileNameOk returns a tuple with the AvatarFileName field if it's non-nil, zero value otherwise 325 | and a boolean to check if the value has been set. 326 | 327 | ### SetAvatarFileName 328 | 329 | `func (o *User) SetAvatarFileName(v string)` 330 | 331 | SetAvatarFileName sets AvatarFileName field to given value. 332 | 333 | ### HasAvatarFileName 334 | 335 | `func (o *User) HasAvatarFileName() bool` 336 | 337 | HasAvatarFileName returns a boolean if a field has been set. 338 | 339 | 340 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 341 | 342 | 343 | -------------------------------------------------------------------------------- /auraframes/model_contributor_tokens.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // ContributorTokens struct for ContributorTokens 19 | type ContributorTokens struct { 20 | Email *string `json:"email,omitempty"` 21 | PhoneNumber *string `json:"phone_number,omitempty"` 22 | ExpiresAt *string `json:"expires_at,omitempty"` 23 | CreatedAt *string `json:"created_at,omitempty"` 24 | UpdatedAt *string `json:"updated_at,omitempty"` 25 | FrameId *string `json:"frame_id,omitempty"` 26 | ContributorName *string `json:"contributor_name,omitempty"` 27 | } 28 | 29 | // NewContributorTokens instantiates a new ContributorTokens object 30 | // This constructor will assign default values to properties that have it defined, 31 | // and makes sure properties required by API are set, but the set of arguments 32 | // will change when the set of required properties is changed 33 | func NewContributorTokens() *ContributorTokens { 34 | this := ContributorTokens{} 35 | return &this 36 | } 37 | 38 | // NewContributorTokensWithDefaults instantiates a new ContributorTokens object 39 | // This constructor will only assign default values to properties that have it defined, 40 | // but it doesn't guarantee that properties required by API are set 41 | func NewContributorTokensWithDefaults() *ContributorTokens { 42 | this := ContributorTokens{} 43 | return &this 44 | } 45 | 46 | // GetEmail returns the Email field value if set, zero value otherwise. 47 | func (o *ContributorTokens) GetEmail() string { 48 | if o == nil || o.Email == nil { 49 | var ret string 50 | return ret 51 | } 52 | return *o.Email 53 | } 54 | 55 | // GetEmailOk returns a tuple with the Email field value if set, nil otherwise 56 | // and a boolean to check if the value has been set. 57 | func (o *ContributorTokens) GetEmailOk() (*string, bool) { 58 | if o == nil || o.Email == nil { 59 | return nil, false 60 | } 61 | return o.Email, true 62 | } 63 | 64 | // HasEmail returns a boolean if a field has been set. 65 | func (o *ContributorTokens) HasEmail() bool { 66 | if o != nil && o.Email != nil { 67 | return true 68 | } 69 | 70 | return false 71 | } 72 | 73 | // SetEmail gets a reference to the given string and assigns it to the Email field. 74 | func (o *ContributorTokens) SetEmail(v string) { 75 | o.Email = &v 76 | } 77 | 78 | // GetPhoneNumber returns the PhoneNumber field value if set, zero value otherwise. 79 | func (o *ContributorTokens) GetPhoneNumber() string { 80 | if o == nil || o.PhoneNumber == nil { 81 | var ret string 82 | return ret 83 | } 84 | return *o.PhoneNumber 85 | } 86 | 87 | // GetPhoneNumberOk returns a tuple with the PhoneNumber field value if set, nil otherwise 88 | // and a boolean to check if the value has been set. 89 | func (o *ContributorTokens) GetPhoneNumberOk() (*string, bool) { 90 | if o == nil || o.PhoneNumber == nil { 91 | return nil, false 92 | } 93 | return o.PhoneNumber, true 94 | } 95 | 96 | // HasPhoneNumber returns a boolean if a field has been set. 97 | func (o *ContributorTokens) HasPhoneNumber() bool { 98 | if o != nil && o.PhoneNumber != nil { 99 | return true 100 | } 101 | 102 | return false 103 | } 104 | 105 | // SetPhoneNumber gets a reference to the given string and assigns it to the PhoneNumber field. 106 | func (o *ContributorTokens) SetPhoneNumber(v string) { 107 | o.PhoneNumber = &v 108 | } 109 | 110 | // GetExpiresAt returns the ExpiresAt field value if set, zero value otherwise. 111 | func (o *ContributorTokens) GetExpiresAt() string { 112 | if o == nil || o.ExpiresAt == nil { 113 | var ret string 114 | return ret 115 | } 116 | return *o.ExpiresAt 117 | } 118 | 119 | // GetExpiresAtOk returns a tuple with the ExpiresAt field value if set, nil otherwise 120 | // and a boolean to check if the value has been set. 121 | func (o *ContributorTokens) GetExpiresAtOk() (*string, bool) { 122 | if o == nil || o.ExpiresAt == nil { 123 | return nil, false 124 | } 125 | return o.ExpiresAt, true 126 | } 127 | 128 | // HasExpiresAt returns a boolean if a field has been set. 129 | func (o *ContributorTokens) HasExpiresAt() bool { 130 | if o != nil && o.ExpiresAt != nil { 131 | return true 132 | } 133 | 134 | return false 135 | } 136 | 137 | // SetExpiresAt gets a reference to the given string and assigns it to the ExpiresAt field. 138 | func (o *ContributorTokens) SetExpiresAt(v string) { 139 | o.ExpiresAt = &v 140 | } 141 | 142 | // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. 143 | func (o *ContributorTokens) GetCreatedAt() string { 144 | if o == nil || o.CreatedAt == nil { 145 | var ret string 146 | return ret 147 | } 148 | return *o.CreatedAt 149 | } 150 | 151 | // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise 152 | // and a boolean to check if the value has been set. 153 | func (o *ContributorTokens) GetCreatedAtOk() (*string, bool) { 154 | if o == nil || o.CreatedAt == nil { 155 | return nil, false 156 | } 157 | return o.CreatedAt, true 158 | } 159 | 160 | // HasCreatedAt returns a boolean if a field has been set. 161 | func (o *ContributorTokens) HasCreatedAt() bool { 162 | if o != nil && o.CreatedAt != nil { 163 | return true 164 | } 165 | 166 | return false 167 | } 168 | 169 | // SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. 170 | func (o *ContributorTokens) SetCreatedAt(v string) { 171 | o.CreatedAt = &v 172 | } 173 | 174 | // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. 175 | func (o *ContributorTokens) GetUpdatedAt() string { 176 | if o == nil || o.UpdatedAt == nil { 177 | var ret string 178 | return ret 179 | } 180 | return *o.UpdatedAt 181 | } 182 | 183 | // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise 184 | // and a boolean to check if the value has been set. 185 | func (o *ContributorTokens) GetUpdatedAtOk() (*string, bool) { 186 | if o == nil || o.UpdatedAt == nil { 187 | return nil, false 188 | } 189 | return o.UpdatedAt, true 190 | } 191 | 192 | // HasUpdatedAt returns a boolean if a field has been set. 193 | func (o *ContributorTokens) HasUpdatedAt() bool { 194 | if o != nil && o.UpdatedAt != nil { 195 | return true 196 | } 197 | 198 | return false 199 | } 200 | 201 | // SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. 202 | func (o *ContributorTokens) SetUpdatedAt(v string) { 203 | o.UpdatedAt = &v 204 | } 205 | 206 | // GetFrameId returns the FrameId field value if set, zero value otherwise. 207 | func (o *ContributorTokens) GetFrameId() string { 208 | if o == nil || o.FrameId == nil { 209 | var ret string 210 | return ret 211 | } 212 | return *o.FrameId 213 | } 214 | 215 | // GetFrameIdOk returns a tuple with the FrameId field value if set, nil otherwise 216 | // and a boolean to check if the value has been set. 217 | func (o *ContributorTokens) GetFrameIdOk() (*string, bool) { 218 | if o == nil || o.FrameId == nil { 219 | return nil, false 220 | } 221 | return o.FrameId, true 222 | } 223 | 224 | // HasFrameId returns a boolean if a field has been set. 225 | func (o *ContributorTokens) HasFrameId() bool { 226 | if o != nil && o.FrameId != nil { 227 | return true 228 | } 229 | 230 | return false 231 | } 232 | 233 | // SetFrameId gets a reference to the given string and assigns it to the FrameId field. 234 | func (o *ContributorTokens) SetFrameId(v string) { 235 | o.FrameId = &v 236 | } 237 | 238 | // GetContributorName returns the ContributorName field value if set, zero value otherwise. 239 | func (o *ContributorTokens) GetContributorName() string { 240 | if o == nil || o.ContributorName == nil { 241 | var ret string 242 | return ret 243 | } 244 | return *o.ContributorName 245 | } 246 | 247 | // GetContributorNameOk returns a tuple with the ContributorName field value if set, nil otherwise 248 | // and a boolean to check if the value has been set. 249 | func (o *ContributorTokens) GetContributorNameOk() (*string, bool) { 250 | if o == nil || o.ContributorName == nil { 251 | return nil, false 252 | } 253 | return o.ContributorName, true 254 | } 255 | 256 | // HasContributorName returns a boolean if a field has been set. 257 | func (o *ContributorTokens) HasContributorName() bool { 258 | if o != nil && o.ContributorName != nil { 259 | return true 260 | } 261 | 262 | return false 263 | } 264 | 265 | // SetContributorName gets a reference to the given string and assigns it to the ContributorName field. 266 | func (o *ContributorTokens) SetContributorName(v string) { 267 | o.ContributorName = &v 268 | } 269 | 270 | func (o ContributorTokens) MarshalJSON() ([]byte, error) { 271 | toSerialize := map[string]interface{}{} 272 | if o.Email != nil { 273 | toSerialize["email"] = o.Email 274 | } 275 | if o.PhoneNumber != nil { 276 | toSerialize["phone_number"] = o.PhoneNumber 277 | } 278 | if o.ExpiresAt != nil { 279 | toSerialize["expires_at"] = o.ExpiresAt 280 | } 281 | if o.CreatedAt != nil { 282 | toSerialize["created_at"] = o.CreatedAt 283 | } 284 | if o.UpdatedAt != nil { 285 | toSerialize["updated_at"] = o.UpdatedAt 286 | } 287 | if o.FrameId != nil { 288 | toSerialize["frame_id"] = o.FrameId 289 | } 290 | if o.ContributorName != nil { 291 | toSerialize["contributor_name"] = o.ContributorName 292 | } 293 | return json.Marshal(toSerialize) 294 | } 295 | 296 | type NullableContributorTokens struct { 297 | value *ContributorTokens 298 | isSet bool 299 | } 300 | 301 | func (v NullableContributorTokens) Get() *ContributorTokens { 302 | return v.value 303 | } 304 | 305 | func (v *NullableContributorTokens) Set(val *ContributorTokens) { 306 | v.value = val 307 | v.isSet = true 308 | } 309 | 310 | func (v NullableContributorTokens) IsSet() bool { 311 | return v.isSet 312 | } 313 | 314 | func (v *NullableContributorTokens) Unset() { 315 | v.value = nil 316 | v.isSet = false 317 | } 318 | 319 | func NewNullableContributorTokens(val *ContributorTokens) *NullableContributorTokens { 320 | return &NullableContributorTokens{value: val, isSet: true} 321 | } 322 | 323 | func (v NullableContributorTokens) MarshalJSON() ([]byte, error) { 324 | return json.Marshal(v.value) 325 | } 326 | 327 | func (v *NullableContributorTokens) UnmarshalJSON(src []byte) error { 328 | v.isSet = true 329 | return json.Unmarshal(src, &v.value) 330 | } 331 | 332 | 333 | -------------------------------------------------------------------------------- /auraframes/docs/Impression.md: -------------------------------------------------------------------------------- 1 | # Impression 2 | 3 | ## Properties 4 | 5 | Name | Type | Description | Notes 6 | ------------ | ------------- | ------------- | ------------- 7 | **LastViewedOrCreatedAt** | Pointer to **string** | | [optional] 8 | **ViewCount** | Pointer to **string** | | [optional] 9 | **GestureDirection** | Pointer to **string** | | [optional] 10 | **CreatedAt** | Pointer to **string** | | [optional] 11 | **LivePhotoOnTransition** | Pointer to **string** | | [optional] 12 | **ViewedAt** | Pointer to **string** | | [optional] 13 | **Id** | Pointer to **string** | | [optional] 14 | **LastViewedAt** | Pointer to **string** | | [optional] 15 | **LastShownWithAssetId** | Pointer to **string** | | [optional] 16 | **FrameId** | Pointer to **string** | | [optional] 17 | **AssetId** | Pointer to **string** | | [optional] 18 | **Asset** | Pointer to [**Asset**](Asset.md) | | [optional] 19 | 20 | ## Methods 21 | 22 | ### NewImpression 23 | 24 | `func NewImpression() *Impression` 25 | 26 | NewImpression instantiates a new Impression object 27 | This constructor will assign default values to properties that have it defined, 28 | and makes sure properties required by API are set, but the set of arguments 29 | will change when the set of required properties is changed 30 | 31 | ### NewImpressionWithDefaults 32 | 33 | `func NewImpressionWithDefaults() *Impression` 34 | 35 | NewImpressionWithDefaults instantiates a new Impression object 36 | This constructor will only assign default values to properties that have it defined, 37 | but it doesn't guarantee that properties required by API are set 38 | 39 | ### GetLastViewedOrCreatedAt 40 | 41 | `func (o *Impression) GetLastViewedOrCreatedAt() string` 42 | 43 | GetLastViewedOrCreatedAt returns the LastViewedOrCreatedAt field if non-nil, zero value otherwise. 44 | 45 | ### GetLastViewedOrCreatedAtOk 46 | 47 | `func (o *Impression) GetLastViewedOrCreatedAtOk() (*string, bool)` 48 | 49 | GetLastViewedOrCreatedAtOk returns a tuple with the LastViewedOrCreatedAt field if it's non-nil, zero value otherwise 50 | and a boolean to check if the value has been set. 51 | 52 | ### SetLastViewedOrCreatedAt 53 | 54 | `func (o *Impression) SetLastViewedOrCreatedAt(v string)` 55 | 56 | SetLastViewedOrCreatedAt sets LastViewedOrCreatedAt field to given value. 57 | 58 | ### HasLastViewedOrCreatedAt 59 | 60 | `func (o *Impression) HasLastViewedOrCreatedAt() bool` 61 | 62 | HasLastViewedOrCreatedAt returns a boolean if a field has been set. 63 | 64 | ### GetViewCount 65 | 66 | `func (o *Impression) GetViewCount() string` 67 | 68 | GetViewCount returns the ViewCount field if non-nil, zero value otherwise. 69 | 70 | ### GetViewCountOk 71 | 72 | `func (o *Impression) GetViewCountOk() (*string, bool)` 73 | 74 | GetViewCountOk returns a tuple with the ViewCount field if it's non-nil, zero value otherwise 75 | and a boolean to check if the value has been set. 76 | 77 | ### SetViewCount 78 | 79 | `func (o *Impression) SetViewCount(v string)` 80 | 81 | SetViewCount sets ViewCount field to given value. 82 | 83 | ### HasViewCount 84 | 85 | `func (o *Impression) HasViewCount() bool` 86 | 87 | HasViewCount returns a boolean if a field has been set. 88 | 89 | ### GetGestureDirection 90 | 91 | `func (o *Impression) GetGestureDirection() string` 92 | 93 | GetGestureDirection returns the GestureDirection field if non-nil, zero value otherwise. 94 | 95 | ### GetGestureDirectionOk 96 | 97 | `func (o *Impression) GetGestureDirectionOk() (*string, bool)` 98 | 99 | GetGestureDirectionOk returns a tuple with the GestureDirection field if it's non-nil, zero value otherwise 100 | and a boolean to check if the value has been set. 101 | 102 | ### SetGestureDirection 103 | 104 | `func (o *Impression) SetGestureDirection(v string)` 105 | 106 | SetGestureDirection sets GestureDirection field to given value. 107 | 108 | ### HasGestureDirection 109 | 110 | `func (o *Impression) HasGestureDirection() bool` 111 | 112 | HasGestureDirection returns a boolean if a field has been set. 113 | 114 | ### GetCreatedAt 115 | 116 | `func (o *Impression) GetCreatedAt() string` 117 | 118 | GetCreatedAt returns the CreatedAt field if non-nil, zero value otherwise. 119 | 120 | ### GetCreatedAtOk 121 | 122 | `func (o *Impression) GetCreatedAtOk() (*string, bool)` 123 | 124 | GetCreatedAtOk returns a tuple with the CreatedAt field if it's non-nil, zero value otherwise 125 | and a boolean to check if the value has been set. 126 | 127 | ### SetCreatedAt 128 | 129 | `func (o *Impression) SetCreatedAt(v string)` 130 | 131 | SetCreatedAt sets CreatedAt field to given value. 132 | 133 | ### HasCreatedAt 134 | 135 | `func (o *Impression) HasCreatedAt() bool` 136 | 137 | HasCreatedAt returns a boolean if a field has been set. 138 | 139 | ### GetLivePhotoOnTransition 140 | 141 | `func (o *Impression) GetLivePhotoOnTransition() string` 142 | 143 | GetLivePhotoOnTransition returns the LivePhotoOnTransition field if non-nil, zero value otherwise. 144 | 145 | ### GetLivePhotoOnTransitionOk 146 | 147 | `func (o *Impression) GetLivePhotoOnTransitionOk() (*string, bool)` 148 | 149 | GetLivePhotoOnTransitionOk returns a tuple with the LivePhotoOnTransition field if it's non-nil, zero value otherwise 150 | and a boolean to check if the value has been set. 151 | 152 | ### SetLivePhotoOnTransition 153 | 154 | `func (o *Impression) SetLivePhotoOnTransition(v string)` 155 | 156 | SetLivePhotoOnTransition sets LivePhotoOnTransition field to given value. 157 | 158 | ### HasLivePhotoOnTransition 159 | 160 | `func (o *Impression) HasLivePhotoOnTransition() bool` 161 | 162 | HasLivePhotoOnTransition returns a boolean if a field has been set. 163 | 164 | ### GetViewedAt 165 | 166 | `func (o *Impression) GetViewedAt() string` 167 | 168 | GetViewedAt returns the ViewedAt field if non-nil, zero value otherwise. 169 | 170 | ### GetViewedAtOk 171 | 172 | `func (o *Impression) GetViewedAtOk() (*string, bool)` 173 | 174 | GetViewedAtOk returns a tuple with the ViewedAt field if it's non-nil, zero value otherwise 175 | and a boolean to check if the value has been set. 176 | 177 | ### SetViewedAt 178 | 179 | `func (o *Impression) SetViewedAt(v string)` 180 | 181 | SetViewedAt sets ViewedAt field to given value. 182 | 183 | ### HasViewedAt 184 | 185 | `func (o *Impression) HasViewedAt() bool` 186 | 187 | HasViewedAt returns a boolean if a field has been set. 188 | 189 | ### GetId 190 | 191 | `func (o *Impression) GetId() string` 192 | 193 | GetId returns the Id field if non-nil, zero value otherwise. 194 | 195 | ### GetIdOk 196 | 197 | `func (o *Impression) GetIdOk() (*string, bool)` 198 | 199 | GetIdOk returns a tuple with the Id field if it's non-nil, zero value otherwise 200 | and a boolean to check if the value has been set. 201 | 202 | ### SetId 203 | 204 | `func (o *Impression) SetId(v string)` 205 | 206 | SetId sets Id field to given value. 207 | 208 | ### HasId 209 | 210 | `func (o *Impression) HasId() bool` 211 | 212 | HasId returns a boolean if a field has been set. 213 | 214 | ### GetLastViewedAt 215 | 216 | `func (o *Impression) GetLastViewedAt() string` 217 | 218 | GetLastViewedAt returns the LastViewedAt field if non-nil, zero value otherwise. 219 | 220 | ### GetLastViewedAtOk 221 | 222 | `func (o *Impression) GetLastViewedAtOk() (*string, bool)` 223 | 224 | GetLastViewedAtOk returns a tuple with the LastViewedAt field if it's non-nil, zero value otherwise 225 | and a boolean to check if the value has been set. 226 | 227 | ### SetLastViewedAt 228 | 229 | `func (o *Impression) SetLastViewedAt(v string)` 230 | 231 | SetLastViewedAt sets LastViewedAt field to given value. 232 | 233 | ### HasLastViewedAt 234 | 235 | `func (o *Impression) HasLastViewedAt() bool` 236 | 237 | HasLastViewedAt returns a boolean if a field has been set. 238 | 239 | ### GetLastShownWithAssetId 240 | 241 | `func (o *Impression) GetLastShownWithAssetId() string` 242 | 243 | GetLastShownWithAssetId returns the LastShownWithAssetId field if non-nil, zero value otherwise. 244 | 245 | ### GetLastShownWithAssetIdOk 246 | 247 | `func (o *Impression) GetLastShownWithAssetIdOk() (*string, bool)` 248 | 249 | GetLastShownWithAssetIdOk returns a tuple with the LastShownWithAssetId field if it's non-nil, zero value otherwise 250 | and a boolean to check if the value has been set. 251 | 252 | ### SetLastShownWithAssetId 253 | 254 | `func (o *Impression) SetLastShownWithAssetId(v string)` 255 | 256 | SetLastShownWithAssetId sets LastShownWithAssetId field to given value. 257 | 258 | ### HasLastShownWithAssetId 259 | 260 | `func (o *Impression) HasLastShownWithAssetId() bool` 261 | 262 | HasLastShownWithAssetId returns a boolean if a field has been set. 263 | 264 | ### GetFrameId 265 | 266 | `func (o *Impression) GetFrameId() string` 267 | 268 | GetFrameId returns the FrameId field if non-nil, zero value otherwise. 269 | 270 | ### GetFrameIdOk 271 | 272 | `func (o *Impression) GetFrameIdOk() (*string, bool)` 273 | 274 | GetFrameIdOk returns a tuple with the FrameId field if it's non-nil, zero value otherwise 275 | and a boolean to check if the value has been set. 276 | 277 | ### SetFrameId 278 | 279 | `func (o *Impression) SetFrameId(v string)` 280 | 281 | SetFrameId sets FrameId field to given value. 282 | 283 | ### HasFrameId 284 | 285 | `func (o *Impression) HasFrameId() bool` 286 | 287 | HasFrameId returns a boolean if a field has been set. 288 | 289 | ### GetAssetId 290 | 291 | `func (o *Impression) GetAssetId() string` 292 | 293 | GetAssetId returns the AssetId field if non-nil, zero value otherwise. 294 | 295 | ### GetAssetIdOk 296 | 297 | `func (o *Impression) GetAssetIdOk() (*string, bool)` 298 | 299 | GetAssetIdOk returns a tuple with the AssetId field if it's non-nil, zero value otherwise 300 | and a boolean to check if the value has been set. 301 | 302 | ### SetAssetId 303 | 304 | `func (o *Impression) SetAssetId(v string)` 305 | 306 | SetAssetId sets AssetId field to given value. 307 | 308 | ### HasAssetId 309 | 310 | `func (o *Impression) HasAssetId() bool` 311 | 312 | HasAssetId returns a boolean if a field has been set. 313 | 314 | ### GetAsset 315 | 316 | `func (o *Impression) GetAsset() Asset` 317 | 318 | GetAsset returns the Asset field if non-nil, zero value otherwise. 319 | 320 | ### GetAssetOk 321 | 322 | `func (o *Impression) GetAssetOk() (*Asset, bool)` 323 | 324 | GetAssetOk returns a tuple with the Asset field if it's non-nil, zero value otherwise 325 | and a boolean to check if the value has been set. 326 | 327 | ### SetAsset 328 | 329 | `func (o *Impression) SetAsset(v Asset)` 330 | 331 | SetAsset sets Asset field to given value. 332 | 333 | ### HasAsset 334 | 335 | `func (o *Impression) HasAsset() bool` 336 | 337 | HasAsset returns a boolean if a field has been set. 338 | 339 | 340 | [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) 341 | 342 | 343 | -------------------------------------------------------------------------------- /auraframes/model_user.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // User struct for User 19 | type User struct { 20 | Id *string `json:"id,omitempty"` 21 | ShortId *string `json:"short_id,omitempty"` 22 | TestAccount *string `json:"test_account,omitempty"` 23 | CreatedAt *string `json:"created_at,omitempty"` 24 | UpdatedAt *string `json:"updated_at,omitempty"` 25 | LatestAppVersion *string `json:"latest_app_version,omitempty"` 26 | Name *string `json:"name,omitempty"` 27 | Email *string `json:"email,omitempty"` 28 | AttributionId *string `json:"attribution_id,omitempty"` 29 | AttributionString *string `json:"attribution_string,omitempty"` 30 | ShowPushPrompt *bool `json:"show_push_prompt,omitempty"` 31 | AvatarFileName *string `json:"avatar_file_name,omitempty"` 32 | } 33 | 34 | // NewUser instantiates a new User object 35 | // This constructor will assign default values to properties that have it defined, 36 | // and makes sure properties required by API are set, but the set of arguments 37 | // will change when the set of required properties is changed 38 | func NewUser() *User { 39 | this := User{} 40 | return &this 41 | } 42 | 43 | // NewUserWithDefaults instantiates a new User object 44 | // This constructor will only assign default values to properties that have it defined, 45 | // but it doesn't guarantee that properties required by API are set 46 | func NewUserWithDefaults() *User { 47 | this := User{} 48 | return &this 49 | } 50 | 51 | // GetId returns the Id field value if set, zero value otherwise. 52 | func (o *User) GetId() string { 53 | if o == nil || o.Id == nil { 54 | var ret string 55 | return ret 56 | } 57 | return *o.Id 58 | } 59 | 60 | // GetIdOk returns a tuple with the Id field value if set, nil otherwise 61 | // and a boolean to check if the value has been set. 62 | func (o *User) GetIdOk() (*string, bool) { 63 | if o == nil || o.Id == nil { 64 | return nil, false 65 | } 66 | return o.Id, true 67 | } 68 | 69 | // HasId returns a boolean if a field has been set. 70 | func (o *User) HasId() bool { 71 | if o != nil && o.Id != nil { 72 | return true 73 | } 74 | 75 | return false 76 | } 77 | 78 | // SetId gets a reference to the given string and assigns it to the Id field. 79 | func (o *User) SetId(v string) { 80 | o.Id = &v 81 | } 82 | 83 | // GetShortId returns the ShortId field value if set, zero value otherwise. 84 | func (o *User) GetShortId() string { 85 | if o == nil || o.ShortId == nil { 86 | var ret string 87 | return ret 88 | } 89 | return *o.ShortId 90 | } 91 | 92 | // GetShortIdOk returns a tuple with the ShortId field value if set, nil otherwise 93 | // and a boolean to check if the value has been set. 94 | func (o *User) GetShortIdOk() (*string, bool) { 95 | if o == nil || o.ShortId == nil { 96 | return nil, false 97 | } 98 | return o.ShortId, true 99 | } 100 | 101 | // HasShortId returns a boolean if a field has been set. 102 | func (o *User) HasShortId() bool { 103 | if o != nil && o.ShortId != nil { 104 | return true 105 | } 106 | 107 | return false 108 | } 109 | 110 | // SetShortId gets a reference to the given string and assigns it to the ShortId field. 111 | func (o *User) SetShortId(v string) { 112 | o.ShortId = &v 113 | } 114 | 115 | // GetTestAccount returns the TestAccount field value if set, zero value otherwise. 116 | func (o *User) GetTestAccount() string { 117 | if o == nil || o.TestAccount == nil { 118 | var ret string 119 | return ret 120 | } 121 | return *o.TestAccount 122 | } 123 | 124 | // GetTestAccountOk returns a tuple with the TestAccount field value if set, nil otherwise 125 | // and a boolean to check if the value has been set. 126 | func (o *User) GetTestAccountOk() (*string, bool) { 127 | if o == nil || o.TestAccount == nil { 128 | return nil, false 129 | } 130 | return o.TestAccount, true 131 | } 132 | 133 | // HasTestAccount returns a boolean if a field has been set. 134 | func (o *User) HasTestAccount() bool { 135 | if o != nil && o.TestAccount != nil { 136 | return true 137 | } 138 | 139 | return false 140 | } 141 | 142 | // SetTestAccount gets a reference to the given string and assigns it to the TestAccount field. 143 | func (o *User) SetTestAccount(v string) { 144 | o.TestAccount = &v 145 | } 146 | 147 | // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. 148 | func (o *User) GetCreatedAt() string { 149 | if o == nil || o.CreatedAt == nil { 150 | var ret string 151 | return ret 152 | } 153 | return *o.CreatedAt 154 | } 155 | 156 | // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise 157 | // and a boolean to check if the value has been set. 158 | func (o *User) GetCreatedAtOk() (*string, bool) { 159 | if o == nil || o.CreatedAt == nil { 160 | return nil, false 161 | } 162 | return o.CreatedAt, true 163 | } 164 | 165 | // HasCreatedAt returns a boolean if a field has been set. 166 | func (o *User) HasCreatedAt() bool { 167 | if o != nil && o.CreatedAt != nil { 168 | return true 169 | } 170 | 171 | return false 172 | } 173 | 174 | // SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. 175 | func (o *User) SetCreatedAt(v string) { 176 | o.CreatedAt = &v 177 | } 178 | 179 | // GetUpdatedAt returns the UpdatedAt field value if set, zero value otherwise. 180 | func (o *User) GetUpdatedAt() string { 181 | if o == nil || o.UpdatedAt == nil { 182 | var ret string 183 | return ret 184 | } 185 | return *o.UpdatedAt 186 | } 187 | 188 | // GetUpdatedAtOk returns a tuple with the UpdatedAt field value if set, nil otherwise 189 | // and a boolean to check if the value has been set. 190 | func (o *User) GetUpdatedAtOk() (*string, bool) { 191 | if o == nil || o.UpdatedAt == nil { 192 | return nil, false 193 | } 194 | return o.UpdatedAt, true 195 | } 196 | 197 | // HasUpdatedAt returns a boolean if a field has been set. 198 | func (o *User) HasUpdatedAt() bool { 199 | if o != nil && o.UpdatedAt != nil { 200 | return true 201 | } 202 | 203 | return false 204 | } 205 | 206 | // SetUpdatedAt gets a reference to the given string and assigns it to the UpdatedAt field. 207 | func (o *User) SetUpdatedAt(v string) { 208 | o.UpdatedAt = &v 209 | } 210 | 211 | // GetLatestAppVersion returns the LatestAppVersion field value if set, zero value otherwise. 212 | func (o *User) GetLatestAppVersion() string { 213 | if o == nil || o.LatestAppVersion == nil { 214 | var ret string 215 | return ret 216 | } 217 | return *o.LatestAppVersion 218 | } 219 | 220 | // GetLatestAppVersionOk returns a tuple with the LatestAppVersion field value if set, nil otherwise 221 | // and a boolean to check if the value has been set. 222 | func (o *User) GetLatestAppVersionOk() (*string, bool) { 223 | if o == nil || o.LatestAppVersion == nil { 224 | return nil, false 225 | } 226 | return o.LatestAppVersion, true 227 | } 228 | 229 | // HasLatestAppVersion returns a boolean if a field has been set. 230 | func (o *User) HasLatestAppVersion() bool { 231 | if o != nil && o.LatestAppVersion != nil { 232 | return true 233 | } 234 | 235 | return false 236 | } 237 | 238 | // SetLatestAppVersion gets a reference to the given string and assigns it to the LatestAppVersion field. 239 | func (o *User) SetLatestAppVersion(v string) { 240 | o.LatestAppVersion = &v 241 | } 242 | 243 | // GetName returns the Name field value if set, zero value otherwise. 244 | func (o *User) GetName() string { 245 | if o == nil || o.Name == nil { 246 | var ret string 247 | return ret 248 | } 249 | return *o.Name 250 | } 251 | 252 | // GetNameOk returns a tuple with the Name field value if set, nil otherwise 253 | // and a boolean to check if the value has been set. 254 | func (o *User) GetNameOk() (*string, bool) { 255 | if o == nil || o.Name == nil { 256 | return nil, false 257 | } 258 | return o.Name, true 259 | } 260 | 261 | // HasName returns a boolean if a field has been set. 262 | func (o *User) HasName() bool { 263 | if o != nil && o.Name != nil { 264 | return true 265 | } 266 | 267 | return false 268 | } 269 | 270 | // SetName gets a reference to the given string and assigns it to the Name field. 271 | func (o *User) SetName(v string) { 272 | o.Name = &v 273 | } 274 | 275 | // GetEmail returns the Email field value if set, zero value otherwise. 276 | func (o *User) GetEmail() string { 277 | if o == nil || o.Email == nil { 278 | var ret string 279 | return ret 280 | } 281 | return *o.Email 282 | } 283 | 284 | // GetEmailOk returns a tuple with the Email field value if set, nil otherwise 285 | // and a boolean to check if the value has been set. 286 | func (o *User) GetEmailOk() (*string, bool) { 287 | if o == nil || o.Email == nil { 288 | return nil, false 289 | } 290 | return o.Email, true 291 | } 292 | 293 | // HasEmail returns a boolean if a field has been set. 294 | func (o *User) HasEmail() bool { 295 | if o != nil && o.Email != nil { 296 | return true 297 | } 298 | 299 | return false 300 | } 301 | 302 | // SetEmail gets a reference to the given string and assigns it to the Email field. 303 | func (o *User) SetEmail(v string) { 304 | o.Email = &v 305 | } 306 | 307 | // GetAttributionId returns the AttributionId field value if set, zero value otherwise. 308 | func (o *User) GetAttributionId() string { 309 | if o == nil || o.AttributionId == nil { 310 | var ret string 311 | return ret 312 | } 313 | return *o.AttributionId 314 | } 315 | 316 | // GetAttributionIdOk returns a tuple with the AttributionId field value if set, nil otherwise 317 | // and a boolean to check if the value has been set. 318 | func (o *User) GetAttributionIdOk() (*string, bool) { 319 | if o == nil || o.AttributionId == nil { 320 | return nil, false 321 | } 322 | return o.AttributionId, true 323 | } 324 | 325 | // HasAttributionId returns a boolean if a field has been set. 326 | func (o *User) HasAttributionId() bool { 327 | if o != nil && o.AttributionId != nil { 328 | return true 329 | } 330 | 331 | return false 332 | } 333 | 334 | // SetAttributionId gets a reference to the given string and assigns it to the AttributionId field. 335 | func (o *User) SetAttributionId(v string) { 336 | o.AttributionId = &v 337 | } 338 | 339 | // GetAttributionString returns the AttributionString field value if set, zero value otherwise. 340 | func (o *User) GetAttributionString() string { 341 | if o == nil || o.AttributionString == nil { 342 | var ret string 343 | return ret 344 | } 345 | return *o.AttributionString 346 | } 347 | 348 | // GetAttributionStringOk returns a tuple with the AttributionString field value if set, nil otherwise 349 | // and a boolean to check if the value has been set. 350 | func (o *User) GetAttributionStringOk() (*string, bool) { 351 | if o == nil || o.AttributionString == nil { 352 | return nil, false 353 | } 354 | return o.AttributionString, true 355 | } 356 | 357 | // HasAttributionString returns a boolean if a field has been set. 358 | func (o *User) HasAttributionString() bool { 359 | if o != nil && o.AttributionString != nil { 360 | return true 361 | } 362 | 363 | return false 364 | } 365 | 366 | // SetAttributionString gets a reference to the given string and assigns it to the AttributionString field. 367 | func (o *User) SetAttributionString(v string) { 368 | o.AttributionString = &v 369 | } 370 | 371 | // GetShowPushPrompt returns the ShowPushPrompt field value if set, zero value otherwise. 372 | func (o *User) GetShowPushPrompt() bool { 373 | if o == nil || o.ShowPushPrompt == nil { 374 | var ret bool 375 | return ret 376 | } 377 | return *o.ShowPushPrompt 378 | } 379 | 380 | // GetShowPushPromptOk returns a tuple with the ShowPushPrompt field value if set, nil otherwise 381 | // and a boolean to check if the value has been set. 382 | func (o *User) GetShowPushPromptOk() (*bool, bool) { 383 | if o == nil || o.ShowPushPrompt == nil { 384 | return nil, false 385 | } 386 | return o.ShowPushPrompt, true 387 | } 388 | 389 | // HasShowPushPrompt returns a boolean if a field has been set. 390 | func (o *User) HasShowPushPrompt() bool { 391 | if o != nil && o.ShowPushPrompt != nil { 392 | return true 393 | } 394 | 395 | return false 396 | } 397 | 398 | // SetShowPushPrompt gets a reference to the given bool and assigns it to the ShowPushPrompt field. 399 | func (o *User) SetShowPushPrompt(v bool) { 400 | o.ShowPushPrompt = &v 401 | } 402 | 403 | // GetAvatarFileName returns the AvatarFileName field value if set, zero value otherwise. 404 | func (o *User) GetAvatarFileName() string { 405 | if o == nil || o.AvatarFileName == nil { 406 | var ret string 407 | return ret 408 | } 409 | return *o.AvatarFileName 410 | } 411 | 412 | // GetAvatarFileNameOk returns a tuple with the AvatarFileName field value if set, nil otherwise 413 | // and a boolean to check if the value has been set. 414 | func (o *User) GetAvatarFileNameOk() (*string, bool) { 415 | if o == nil || o.AvatarFileName == nil { 416 | return nil, false 417 | } 418 | return o.AvatarFileName, true 419 | } 420 | 421 | // HasAvatarFileName returns a boolean if a field has been set. 422 | func (o *User) HasAvatarFileName() bool { 423 | if o != nil && o.AvatarFileName != nil { 424 | return true 425 | } 426 | 427 | return false 428 | } 429 | 430 | // SetAvatarFileName gets a reference to the given string and assigns it to the AvatarFileName field. 431 | func (o *User) SetAvatarFileName(v string) { 432 | o.AvatarFileName = &v 433 | } 434 | 435 | func (o User) MarshalJSON() ([]byte, error) { 436 | toSerialize := map[string]interface{}{} 437 | if o.Id != nil { 438 | toSerialize["id"] = o.Id 439 | } 440 | if o.ShortId != nil { 441 | toSerialize["short_id"] = o.ShortId 442 | } 443 | if o.TestAccount != nil { 444 | toSerialize["test_account"] = o.TestAccount 445 | } 446 | if o.CreatedAt != nil { 447 | toSerialize["created_at"] = o.CreatedAt 448 | } 449 | if o.UpdatedAt != nil { 450 | toSerialize["updated_at"] = o.UpdatedAt 451 | } 452 | if o.LatestAppVersion != nil { 453 | toSerialize["latest_app_version"] = o.LatestAppVersion 454 | } 455 | if o.Name != nil { 456 | toSerialize["name"] = o.Name 457 | } 458 | if o.Email != nil { 459 | toSerialize["email"] = o.Email 460 | } 461 | if o.AttributionId != nil { 462 | toSerialize["attribution_id"] = o.AttributionId 463 | } 464 | if o.AttributionString != nil { 465 | toSerialize["attribution_string"] = o.AttributionString 466 | } 467 | if o.ShowPushPrompt != nil { 468 | toSerialize["show_push_prompt"] = o.ShowPushPrompt 469 | } 470 | if o.AvatarFileName != nil { 471 | toSerialize["avatar_file_name"] = o.AvatarFileName 472 | } 473 | return json.Marshal(toSerialize) 474 | } 475 | 476 | type NullableUser struct { 477 | value *User 478 | isSet bool 479 | } 480 | 481 | func (v NullableUser) Get() *User { 482 | return v.value 483 | } 484 | 485 | func (v *NullableUser) Set(val *User) { 486 | v.value = val 487 | v.isSet = true 488 | } 489 | 490 | func (v NullableUser) IsSet() bool { 491 | return v.isSet 492 | } 493 | 494 | func (v *NullableUser) Unset() { 495 | v.value = nil 496 | v.isSet = false 497 | } 498 | 499 | func NewNullableUser(val *User) *NullableUser { 500 | return &NullableUser{value: val, isSet: true} 501 | } 502 | 503 | func (v NullableUser) MarshalJSON() ([]byte, error) { 504 | return json.Marshal(v.value) 505 | } 506 | 507 | func (v *NullableUser) UnmarshalJSON(src []byte) error { 508 | v.isSet = true 509 | return json.Unmarshal(src, &v.value) 510 | } 511 | 512 | 513 | -------------------------------------------------------------------------------- /auraframes/model_impression.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "encoding/json" 16 | ) 17 | 18 | // Impression struct for Impression 19 | type Impression struct { 20 | LastViewedOrCreatedAt *string `json:"last_viewed_or_created_at,omitempty"` 21 | ViewCount *string `json:"view_count,omitempty"` 22 | GestureDirection *string `json:"gesture_direction,omitempty"` 23 | CreatedAt *string `json:"created_at,omitempty"` 24 | LivePhotoOnTransition *string `json:"live_photo_on_transition,omitempty"` 25 | ViewedAt *string `json:"viewed_at,omitempty"` 26 | Id *string `json:"id,omitempty"` 27 | LastViewedAt *string `json:"last_viewed_at,omitempty"` 28 | LastShownWithAssetId *string `json:"last_shown_with_asset_id,omitempty"` 29 | FrameId *string `json:"frame_id,omitempty"` 30 | AssetId *string `json:"asset_id,omitempty"` 31 | Asset *Asset `json:"asset,omitempty"` 32 | } 33 | 34 | // NewImpression instantiates a new Impression object 35 | // This constructor will assign default values to properties that have it defined, 36 | // and makes sure properties required by API are set, but the set of arguments 37 | // will change when the set of required properties is changed 38 | func NewImpression() *Impression { 39 | this := Impression{} 40 | return &this 41 | } 42 | 43 | // NewImpressionWithDefaults instantiates a new Impression object 44 | // This constructor will only assign default values to properties that have it defined, 45 | // but it doesn't guarantee that properties required by API are set 46 | func NewImpressionWithDefaults() *Impression { 47 | this := Impression{} 48 | return &this 49 | } 50 | 51 | // GetLastViewedOrCreatedAt returns the LastViewedOrCreatedAt field value if set, zero value otherwise. 52 | func (o *Impression) GetLastViewedOrCreatedAt() string { 53 | if o == nil || o.LastViewedOrCreatedAt == nil { 54 | var ret string 55 | return ret 56 | } 57 | return *o.LastViewedOrCreatedAt 58 | } 59 | 60 | // GetLastViewedOrCreatedAtOk returns a tuple with the LastViewedOrCreatedAt field value if set, nil otherwise 61 | // and a boolean to check if the value has been set. 62 | func (o *Impression) GetLastViewedOrCreatedAtOk() (*string, bool) { 63 | if o == nil || o.LastViewedOrCreatedAt == nil { 64 | return nil, false 65 | } 66 | return o.LastViewedOrCreatedAt, true 67 | } 68 | 69 | // HasLastViewedOrCreatedAt returns a boolean if a field has been set. 70 | func (o *Impression) HasLastViewedOrCreatedAt() bool { 71 | if o != nil && o.LastViewedOrCreatedAt != nil { 72 | return true 73 | } 74 | 75 | return false 76 | } 77 | 78 | // SetLastViewedOrCreatedAt gets a reference to the given string and assigns it to the LastViewedOrCreatedAt field. 79 | func (o *Impression) SetLastViewedOrCreatedAt(v string) { 80 | o.LastViewedOrCreatedAt = &v 81 | } 82 | 83 | // GetViewCount returns the ViewCount field value if set, zero value otherwise. 84 | func (o *Impression) GetViewCount() string { 85 | if o == nil || o.ViewCount == nil { 86 | var ret string 87 | return ret 88 | } 89 | return *o.ViewCount 90 | } 91 | 92 | // GetViewCountOk returns a tuple with the ViewCount field value if set, nil otherwise 93 | // and a boolean to check if the value has been set. 94 | func (o *Impression) GetViewCountOk() (*string, bool) { 95 | if o == nil || o.ViewCount == nil { 96 | return nil, false 97 | } 98 | return o.ViewCount, true 99 | } 100 | 101 | // HasViewCount returns a boolean if a field has been set. 102 | func (o *Impression) HasViewCount() bool { 103 | if o != nil && o.ViewCount != nil { 104 | return true 105 | } 106 | 107 | return false 108 | } 109 | 110 | // SetViewCount gets a reference to the given string and assigns it to the ViewCount field. 111 | func (o *Impression) SetViewCount(v string) { 112 | o.ViewCount = &v 113 | } 114 | 115 | // GetGestureDirection returns the GestureDirection field value if set, zero value otherwise. 116 | func (o *Impression) GetGestureDirection() string { 117 | if o == nil || o.GestureDirection == nil { 118 | var ret string 119 | return ret 120 | } 121 | return *o.GestureDirection 122 | } 123 | 124 | // GetGestureDirectionOk returns a tuple with the GestureDirection field value if set, nil otherwise 125 | // and a boolean to check if the value has been set. 126 | func (o *Impression) GetGestureDirectionOk() (*string, bool) { 127 | if o == nil || o.GestureDirection == nil { 128 | return nil, false 129 | } 130 | return o.GestureDirection, true 131 | } 132 | 133 | // HasGestureDirection returns a boolean if a field has been set. 134 | func (o *Impression) HasGestureDirection() bool { 135 | if o != nil && o.GestureDirection != nil { 136 | return true 137 | } 138 | 139 | return false 140 | } 141 | 142 | // SetGestureDirection gets a reference to the given string and assigns it to the GestureDirection field. 143 | func (o *Impression) SetGestureDirection(v string) { 144 | o.GestureDirection = &v 145 | } 146 | 147 | // GetCreatedAt returns the CreatedAt field value if set, zero value otherwise. 148 | func (o *Impression) GetCreatedAt() string { 149 | if o == nil || o.CreatedAt == nil { 150 | var ret string 151 | return ret 152 | } 153 | return *o.CreatedAt 154 | } 155 | 156 | // GetCreatedAtOk returns a tuple with the CreatedAt field value if set, nil otherwise 157 | // and a boolean to check if the value has been set. 158 | func (o *Impression) GetCreatedAtOk() (*string, bool) { 159 | if o == nil || o.CreatedAt == nil { 160 | return nil, false 161 | } 162 | return o.CreatedAt, true 163 | } 164 | 165 | // HasCreatedAt returns a boolean if a field has been set. 166 | func (o *Impression) HasCreatedAt() bool { 167 | if o != nil && o.CreatedAt != nil { 168 | return true 169 | } 170 | 171 | return false 172 | } 173 | 174 | // SetCreatedAt gets a reference to the given string and assigns it to the CreatedAt field. 175 | func (o *Impression) SetCreatedAt(v string) { 176 | o.CreatedAt = &v 177 | } 178 | 179 | // GetLivePhotoOnTransition returns the LivePhotoOnTransition field value if set, zero value otherwise. 180 | func (o *Impression) GetLivePhotoOnTransition() string { 181 | if o == nil || o.LivePhotoOnTransition == nil { 182 | var ret string 183 | return ret 184 | } 185 | return *o.LivePhotoOnTransition 186 | } 187 | 188 | // GetLivePhotoOnTransitionOk returns a tuple with the LivePhotoOnTransition field value if set, nil otherwise 189 | // and a boolean to check if the value has been set. 190 | func (o *Impression) GetLivePhotoOnTransitionOk() (*string, bool) { 191 | if o == nil || o.LivePhotoOnTransition == nil { 192 | return nil, false 193 | } 194 | return o.LivePhotoOnTransition, true 195 | } 196 | 197 | // HasLivePhotoOnTransition returns a boolean if a field has been set. 198 | func (o *Impression) HasLivePhotoOnTransition() bool { 199 | if o != nil && o.LivePhotoOnTransition != nil { 200 | return true 201 | } 202 | 203 | return false 204 | } 205 | 206 | // SetLivePhotoOnTransition gets a reference to the given string and assigns it to the LivePhotoOnTransition field. 207 | func (o *Impression) SetLivePhotoOnTransition(v string) { 208 | o.LivePhotoOnTransition = &v 209 | } 210 | 211 | // GetViewedAt returns the ViewedAt field value if set, zero value otherwise. 212 | func (o *Impression) GetViewedAt() string { 213 | if o == nil || o.ViewedAt == nil { 214 | var ret string 215 | return ret 216 | } 217 | return *o.ViewedAt 218 | } 219 | 220 | // GetViewedAtOk returns a tuple with the ViewedAt field value if set, nil otherwise 221 | // and a boolean to check if the value has been set. 222 | func (o *Impression) GetViewedAtOk() (*string, bool) { 223 | if o == nil || o.ViewedAt == nil { 224 | return nil, false 225 | } 226 | return o.ViewedAt, true 227 | } 228 | 229 | // HasViewedAt returns a boolean if a field has been set. 230 | func (o *Impression) HasViewedAt() bool { 231 | if o != nil && o.ViewedAt != nil { 232 | return true 233 | } 234 | 235 | return false 236 | } 237 | 238 | // SetViewedAt gets a reference to the given string and assigns it to the ViewedAt field. 239 | func (o *Impression) SetViewedAt(v string) { 240 | o.ViewedAt = &v 241 | } 242 | 243 | // GetId returns the Id field value if set, zero value otherwise. 244 | func (o *Impression) GetId() string { 245 | if o == nil || o.Id == nil { 246 | var ret string 247 | return ret 248 | } 249 | return *o.Id 250 | } 251 | 252 | // GetIdOk returns a tuple with the Id field value if set, nil otherwise 253 | // and a boolean to check if the value has been set. 254 | func (o *Impression) GetIdOk() (*string, bool) { 255 | if o == nil || o.Id == nil { 256 | return nil, false 257 | } 258 | return o.Id, true 259 | } 260 | 261 | // HasId returns a boolean if a field has been set. 262 | func (o *Impression) HasId() bool { 263 | if o != nil && o.Id != nil { 264 | return true 265 | } 266 | 267 | return false 268 | } 269 | 270 | // SetId gets a reference to the given string and assigns it to the Id field. 271 | func (o *Impression) SetId(v string) { 272 | o.Id = &v 273 | } 274 | 275 | // GetLastViewedAt returns the LastViewedAt field value if set, zero value otherwise. 276 | func (o *Impression) GetLastViewedAt() string { 277 | if o == nil || o.LastViewedAt == nil { 278 | var ret string 279 | return ret 280 | } 281 | return *o.LastViewedAt 282 | } 283 | 284 | // GetLastViewedAtOk returns a tuple with the LastViewedAt field value if set, nil otherwise 285 | // and a boolean to check if the value has been set. 286 | func (o *Impression) GetLastViewedAtOk() (*string, bool) { 287 | if o == nil || o.LastViewedAt == nil { 288 | return nil, false 289 | } 290 | return o.LastViewedAt, true 291 | } 292 | 293 | // HasLastViewedAt returns a boolean if a field has been set. 294 | func (o *Impression) HasLastViewedAt() bool { 295 | if o != nil && o.LastViewedAt != nil { 296 | return true 297 | } 298 | 299 | return false 300 | } 301 | 302 | // SetLastViewedAt gets a reference to the given string and assigns it to the LastViewedAt field. 303 | func (o *Impression) SetLastViewedAt(v string) { 304 | o.LastViewedAt = &v 305 | } 306 | 307 | // GetLastShownWithAssetId returns the LastShownWithAssetId field value if set, zero value otherwise. 308 | func (o *Impression) GetLastShownWithAssetId() string { 309 | if o == nil || o.LastShownWithAssetId == nil { 310 | var ret string 311 | return ret 312 | } 313 | return *o.LastShownWithAssetId 314 | } 315 | 316 | // GetLastShownWithAssetIdOk returns a tuple with the LastShownWithAssetId field value if set, nil otherwise 317 | // and a boolean to check if the value has been set. 318 | func (o *Impression) GetLastShownWithAssetIdOk() (*string, bool) { 319 | if o == nil || o.LastShownWithAssetId == nil { 320 | return nil, false 321 | } 322 | return o.LastShownWithAssetId, true 323 | } 324 | 325 | // HasLastShownWithAssetId returns a boolean if a field has been set. 326 | func (o *Impression) HasLastShownWithAssetId() bool { 327 | if o != nil && o.LastShownWithAssetId != nil { 328 | return true 329 | } 330 | 331 | return false 332 | } 333 | 334 | // SetLastShownWithAssetId gets a reference to the given string and assigns it to the LastShownWithAssetId field. 335 | func (o *Impression) SetLastShownWithAssetId(v string) { 336 | o.LastShownWithAssetId = &v 337 | } 338 | 339 | // GetFrameId returns the FrameId field value if set, zero value otherwise. 340 | func (o *Impression) GetFrameId() string { 341 | if o == nil || o.FrameId == nil { 342 | var ret string 343 | return ret 344 | } 345 | return *o.FrameId 346 | } 347 | 348 | // GetFrameIdOk returns a tuple with the FrameId field value if set, nil otherwise 349 | // and a boolean to check if the value has been set. 350 | func (o *Impression) GetFrameIdOk() (*string, bool) { 351 | if o == nil || o.FrameId == nil { 352 | return nil, false 353 | } 354 | return o.FrameId, true 355 | } 356 | 357 | // HasFrameId returns a boolean if a field has been set. 358 | func (o *Impression) HasFrameId() bool { 359 | if o != nil && o.FrameId != nil { 360 | return true 361 | } 362 | 363 | return false 364 | } 365 | 366 | // SetFrameId gets a reference to the given string and assigns it to the FrameId field. 367 | func (o *Impression) SetFrameId(v string) { 368 | o.FrameId = &v 369 | } 370 | 371 | // GetAssetId returns the AssetId field value if set, zero value otherwise. 372 | func (o *Impression) GetAssetId() string { 373 | if o == nil || o.AssetId == nil { 374 | var ret string 375 | return ret 376 | } 377 | return *o.AssetId 378 | } 379 | 380 | // GetAssetIdOk returns a tuple with the AssetId field value if set, nil otherwise 381 | // and a boolean to check if the value has been set. 382 | func (o *Impression) GetAssetIdOk() (*string, bool) { 383 | if o == nil || o.AssetId == nil { 384 | return nil, false 385 | } 386 | return o.AssetId, true 387 | } 388 | 389 | // HasAssetId returns a boolean if a field has been set. 390 | func (o *Impression) HasAssetId() bool { 391 | if o != nil && o.AssetId != nil { 392 | return true 393 | } 394 | 395 | return false 396 | } 397 | 398 | // SetAssetId gets a reference to the given string and assigns it to the AssetId field. 399 | func (o *Impression) SetAssetId(v string) { 400 | o.AssetId = &v 401 | } 402 | 403 | // GetAsset returns the Asset field value if set, zero value otherwise. 404 | func (o *Impression) GetAsset() Asset { 405 | if o == nil || o.Asset == nil { 406 | var ret Asset 407 | return ret 408 | } 409 | return *o.Asset 410 | } 411 | 412 | // GetAssetOk returns a tuple with the Asset field value if set, nil otherwise 413 | // and a boolean to check if the value has been set. 414 | func (o *Impression) GetAssetOk() (*Asset, bool) { 415 | if o == nil || o.Asset == nil { 416 | return nil, false 417 | } 418 | return o.Asset, true 419 | } 420 | 421 | // HasAsset returns a boolean if a field has been set. 422 | func (o *Impression) HasAsset() bool { 423 | if o != nil && o.Asset != nil { 424 | return true 425 | } 426 | 427 | return false 428 | } 429 | 430 | // SetAsset gets a reference to the given Asset and assigns it to the Asset field. 431 | func (o *Impression) SetAsset(v Asset) { 432 | o.Asset = &v 433 | } 434 | 435 | func (o Impression) MarshalJSON() ([]byte, error) { 436 | toSerialize := map[string]interface{}{} 437 | if o.LastViewedOrCreatedAt != nil { 438 | toSerialize["last_viewed_or_created_at"] = o.LastViewedOrCreatedAt 439 | } 440 | if o.ViewCount != nil { 441 | toSerialize["view_count"] = o.ViewCount 442 | } 443 | if o.GestureDirection != nil { 444 | toSerialize["gesture_direction"] = o.GestureDirection 445 | } 446 | if o.CreatedAt != nil { 447 | toSerialize["created_at"] = o.CreatedAt 448 | } 449 | if o.LivePhotoOnTransition != nil { 450 | toSerialize["live_photo_on_transition"] = o.LivePhotoOnTransition 451 | } 452 | if o.ViewedAt != nil { 453 | toSerialize["viewed_at"] = o.ViewedAt 454 | } 455 | if o.Id != nil { 456 | toSerialize["id"] = o.Id 457 | } 458 | if o.LastViewedAt != nil { 459 | toSerialize["last_viewed_at"] = o.LastViewedAt 460 | } 461 | if o.LastShownWithAssetId != nil { 462 | toSerialize["last_shown_with_asset_id"] = o.LastShownWithAssetId 463 | } 464 | if o.FrameId != nil { 465 | toSerialize["frame_id"] = o.FrameId 466 | } 467 | if o.AssetId != nil { 468 | toSerialize["asset_id"] = o.AssetId 469 | } 470 | if o.Asset != nil { 471 | toSerialize["asset"] = o.Asset 472 | } 473 | return json.Marshal(toSerialize) 474 | } 475 | 476 | type NullableImpression struct { 477 | value *Impression 478 | isSet bool 479 | } 480 | 481 | func (v NullableImpression) Get() *Impression { 482 | return v.value 483 | } 484 | 485 | func (v *NullableImpression) Set(val *Impression) { 486 | v.value = val 487 | v.isSet = true 488 | } 489 | 490 | func (v NullableImpression) IsSet() bool { 491 | return v.isSet 492 | } 493 | 494 | func (v *NullableImpression) Unset() { 495 | v.value = nil 496 | v.isSet = false 497 | } 498 | 499 | func NewNullableImpression(val *Impression) *NullableImpression { 500 | return &NullableImpression{value: val, isSet: true} 501 | } 502 | 503 | func (v NullableImpression) MarshalJSON() ([]byte, error) { 504 | return json.Marshal(v.value) 505 | } 506 | 507 | func (v *NullableImpression) UnmarshalJSON(src []byte) error { 508 | v.isSet = true 509 | return json.Unmarshal(src, &v.value) 510 | } 511 | 512 | 513 | -------------------------------------------------------------------------------- /auraframes/client.go: -------------------------------------------------------------------------------- 1 | /* 2 | Aura Frame API - Unofficial 3 | 4 | Reverse Engineered API for Aura Frames 5 | 6 | API version: 0.0.1 7 | Contact: dave@mudsite.com 8 | */ 9 | 10 | // Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. 11 | 12 | package auraframes 13 | 14 | import ( 15 | "bytes" 16 | "context" 17 | "encoding/json" 18 | "encoding/xml" 19 | "errors" 20 | "fmt" 21 | "io" 22 | "io/ioutil" 23 | "log" 24 | "mime/multipart" 25 | "net/http" 26 | "net/http/httputil" 27 | "net/url" 28 | "os" 29 | "path/filepath" 30 | "reflect" 31 | "regexp" 32 | "strconv" 33 | "strings" 34 | "time" 35 | "unicode/utf8" 36 | 37 | "golang.org/x/oauth2" 38 | ) 39 | 40 | var ( 41 | jsonCheck = regexp.MustCompile(`(?i:(?:application|text)/(?:vnd\.[^;]+\+)?json)`) 42 | xmlCheck = regexp.MustCompile(`(?i:(?:application|text)/xml)`) 43 | ) 44 | 45 | // APIClient manages communication with the Aura Frame API - Unofficial API v0.0.1 46 | // In most cases there should be only one, shared, APIClient. 47 | type APIClient struct { 48 | cfg *Configuration 49 | common service // Reuse a single struct instead of allocating one for each service on the heap. 50 | 51 | // API Services 52 | 53 | AuthApi AuthApi 54 | 55 | FramesApi FramesApi 56 | } 57 | 58 | type service struct { 59 | client *APIClient 60 | } 61 | 62 | // NewAPIClient creates a new API client. Requires a userAgent string describing your application. 63 | // optionally a custom http.Client to allow for advanced features such as caching. 64 | func NewAPIClient(cfg *Configuration) *APIClient { 65 | if cfg.HTTPClient == nil { 66 | cfg.HTTPClient = http.DefaultClient 67 | } 68 | 69 | c := &APIClient{} 70 | c.cfg = cfg 71 | c.common.client = c 72 | 73 | // API Services 74 | c.AuthApi = (*AuthApiService)(&c.common) 75 | c.FramesApi = (*FramesApiService)(&c.common) 76 | 77 | return c 78 | } 79 | 80 | func atoi(in string) (int, error) { 81 | return strconv.Atoi(in) 82 | } 83 | 84 | // selectHeaderContentType select a content type from the available list. 85 | func selectHeaderContentType(contentTypes []string) string { 86 | if len(contentTypes) == 0 { 87 | return "" 88 | } 89 | if contains(contentTypes, "application/json") { 90 | return "application/json" 91 | } 92 | return contentTypes[0] // use the first content type specified in 'consumes' 93 | } 94 | 95 | // selectHeaderAccept join all accept types and return 96 | func selectHeaderAccept(accepts []string) string { 97 | if len(accepts) == 0 { 98 | return "" 99 | } 100 | 101 | if contains(accepts, "application/json") { 102 | return "application/json" 103 | } 104 | 105 | return strings.Join(accepts, ",") 106 | } 107 | 108 | // contains is a case insensitive match, finding needle in a haystack 109 | func contains(haystack []string, needle string) bool { 110 | for _, a := range haystack { 111 | if strings.ToLower(a) == strings.ToLower(needle) { 112 | return true 113 | } 114 | } 115 | return false 116 | } 117 | 118 | // Verify optional parameters are of the correct type. 119 | func typeCheckParameter(obj interface{}, expected string, name string) error { 120 | // Make sure there is an object. 121 | if obj == nil { 122 | return nil 123 | } 124 | 125 | // Check the type is as expected. 126 | if reflect.TypeOf(obj).String() != expected { 127 | return fmt.Errorf("Expected %s to be of type %s but received %s.", name, expected, reflect.TypeOf(obj).String()) 128 | } 129 | return nil 130 | } 131 | 132 | // parameterToString convert interface{} parameters to string, using a delimiter if format is provided. 133 | func parameterToString(obj interface{}, collectionFormat string) string { 134 | var delimiter string 135 | 136 | switch collectionFormat { 137 | case "pipes": 138 | delimiter = "|" 139 | case "ssv": 140 | delimiter = " " 141 | case "tsv": 142 | delimiter = "\t" 143 | case "csv": 144 | delimiter = "," 145 | } 146 | 147 | if reflect.TypeOf(obj).Kind() == reflect.Slice { 148 | return strings.Trim(strings.Replace(fmt.Sprint(obj), " ", delimiter, -1), "[]") 149 | } else if t, ok := obj.(time.Time); ok { 150 | return t.Format(time.RFC3339) 151 | } 152 | 153 | return fmt.Sprintf("%v", obj) 154 | } 155 | 156 | // helper for converting interface{} parameters to json strings 157 | func parameterToJson(obj interface{}) (string, error) { 158 | jsonBuf, err := json.Marshal(obj) 159 | if err != nil { 160 | return "", err 161 | } 162 | return string(jsonBuf), err 163 | } 164 | 165 | // callAPI do the request. 166 | func (c *APIClient) callAPI(request *http.Request) (*http.Response, error) { 167 | if c.cfg.Debug { 168 | dump, err := httputil.DumpRequestOut(request, true) 169 | if err != nil { 170 | return nil, err 171 | } 172 | log.Printf("\n%s\n", string(dump)) 173 | } 174 | 175 | resp, err := c.cfg.HTTPClient.Do(request) 176 | if err != nil { 177 | return resp, err 178 | } 179 | 180 | if c.cfg.Debug { 181 | dump, err := httputil.DumpResponse(resp, true) 182 | if err != nil { 183 | return resp, err 184 | } 185 | log.Printf("\n%s\n", string(dump)) 186 | } 187 | return resp, err 188 | } 189 | 190 | // Allow modification of underlying config for alternate implementations and testing 191 | // Caution: modifying the configuration while live can cause data races and potentially unwanted behavior 192 | func (c *APIClient) GetConfig() *Configuration { 193 | return c.cfg 194 | } 195 | 196 | type formFile struct { 197 | fileBytes []byte 198 | fileName string 199 | formFileName string 200 | } 201 | 202 | // prepareRequest build the request 203 | func (c *APIClient) prepareRequest( 204 | ctx context.Context, 205 | path string, method string, 206 | postBody interface{}, 207 | headerParams map[string]string, 208 | queryParams url.Values, 209 | formParams url.Values, 210 | formFiles []formFile) (localVarRequest *http.Request, err error) { 211 | 212 | var body *bytes.Buffer 213 | 214 | // Detect postBody type and post. 215 | if postBody != nil { 216 | contentType := headerParams["Content-Type"] 217 | if contentType == "" { 218 | contentType = detectContentType(postBody) 219 | headerParams["Content-Type"] = contentType 220 | } 221 | 222 | body, err = setBody(postBody, contentType) 223 | if err != nil { 224 | return nil, err 225 | } 226 | } 227 | 228 | // add form parameters and file if available. 229 | if strings.HasPrefix(headerParams["Content-Type"], "multipart/form-data") && len(formParams) > 0 || (len(formFiles) > 0) { 230 | if body != nil { 231 | return nil, errors.New("Cannot specify postBody and multipart form at the same time.") 232 | } 233 | body = &bytes.Buffer{} 234 | w := multipart.NewWriter(body) 235 | 236 | for k, v := range formParams { 237 | for _, iv := range v { 238 | if strings.HasPrefix(k, "@") { // file 239 | err = addFile(w, k[1:], iv) 240 | if err != nil { 241 | return nil, err 242 | } 243 | } else { // form value 244 | w.WriteField(k, iv) 245 | } 246 | } 247 | } 248 | for _, formFile := range formFiles { 249 | if len(formFile.fileBytes) > 0 && formFile.fileName != "" { 250 | w.Boundary() 251 | part, err := w.CreateFormFile(formFile.formFileName, filepath.Base(formFile.fileName)) 252 | if err != nil { 253 | return nil, err 254 | } 255 | _, err = part.Write(formFile.fileBytes) 256 | if err != nil { 257 | return nil, err 258 | } 259 | } 260 | } 261 | 262 | // Set the Boundary in the Content-Type 263 | headerParams["Content-Type"] = w.FormDataContentType() 264 | 265 | // Set Content-Length 266 | headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) 267 | w.Close() 268 | } 269 | 270 | if strings.HasPrefix(headerParams["Content-Type"], "application/x-www-form-urlencoded") && len(formParams) > 0 { 271 | if body != nil { 272 | return nil, errors.New("Cannot specify postBody and x-www-form-urlencoded form at the same time.") 273 | } 274 | body = &bytes.Buffer{} 275 | body.WriteString(formParams.Encode()) 276 | // Set Content-Length 277 | headerParams["Content-Length"] = fmt.Sprintf("%d", body.Len()) 278 | } 279 | 280 | // Setup path and query parameters 281 | url, err := url.Parse(path) 282 | if err != nil { 283 | return nil, err 284 | } 285 | 286 | // Override request host, if applicable 287 | if c.cfg.Host != "" { 288 | url.Host = c.cfg.Host 289 | } 290 | 291 | // Override request scheme, if applicable 292 | if c.cfg.Scheme != "" { 293 | url.Scheme = c.cfg.Scheme 294 | } 295 | 296 | // Adding Query Param 297 | query := url.Query() 298 | for k, v := range queryParams { 299 | for _, iv := range v { 300 | query.Add(k, iv) 301 | } 302 | } 303 | 304 | // Encode the parameters. 305 | url.RawQuery = query.Encode() 306 | 307 | // Generate a new request 308 | if body != nil { 309 | localVarRequest, err = http.NewRequest(method, url.String(), body) 310 | } else { 311 | localVarRequest, err = http.NewRequest(method, url.String(), nil) 312 | } 313 | if err != nil { 314 | return nil, err 315 | } 316 | 317 | // add header parameters, if any 318 | if len(headerParams) > 0 { 319 | headers := http.Header{} 320 | for h, v := range headerParams { 321 | headers[h] = []string{v} 322 | } 323 | localVarRequest.Header = headers 324 | } 325 | 326 | // Add the user agent to the request. 327 | localVarRequest.Header.Add("User-Agent", c.cfg.UserAgent) 328 | 329 | if ctx != nil { 330 | // add context to the request 331 | localVarRequest = localVarRequest.WithContext(ctx) 332 | 333 | // Walk through any authentication. 334 | 335 | // OAuth2 authentication 336 | if tok, ok := ctx.Value(ContextOAuth2).(oauth2.TokenSource); ok { 337 | // We were able to grab an oauth2 token from the context 338 | var latestToken *oauth2.Token 339 | if latestToken, err = tok.Token(); err != nil { 340 | return nil, err 341 | } 342 | 343 | latestToken.SetAuthHeader(localVarRequest) 344 | } 345 | 346 | // Basic HTTP Authentication 347 | if auth, ok := ctx.Value(ContextBasicAuth).(BasicAuth); ok { 348 | localVarRequest.SetBasicAuth(auth.UserName, auth.Password) 349 | } 350 | 351 | // AccessToken Authentication 352 | if auth, ok := ctx.Value(ContextAccessToken).(string); ok { 353 | localVarRequest.Header.Add("Authorization", "Bearer "+auth) 354 | } 355 | 356 | } 357 | 358 | for header, value := range c.cfg.DefaultHeader { 359 | localVarRequest.Header.Add(header, value) 360 | } 361 | return localVarRequest, nil 362 | } 363 | 364 | func (c *APIClient) decode(v interface{}, b []byte, contentType string) (err error) { 365 | if len(b) == 0 { 366 | return nil 367 | } 368 | if s, ok := v.(*string); ok { 369 | *s = string(b) 370 | return nil 371 | } 372 | if f, ok := v.(**os.File); ok { 373 | *f, err = ioutil.TempFile("", "HttpClientFile") 374 | if err != nil { 375 | return 376 | } 377 | _, err = (*f).Write(b) 378 | if err != nil { 379 | return 380 | } 381 | _, err = (*f).Seek(0, io.SeekStart) 382 | return 383 | } 384 | if xmlCheck.MatchString(contentType) { 385 | if err = xml.Unmarshal(b, v); err != nil { 386 | return err 387 | } 388 | return nil 389 | } 390 | if jsonCheck.MatchString(contentType) { 391 | if actualObj, ok := v.(interface{ GetActualInstance() interface{} }); ok { // oneOf, anyOf schemas 392 | if unmarshalObj, ok := actualObj.(interface{ UnmarshalJSON([]byte) error }); ok { // make sure it has UnmarshalJSON defined 393 | if err = unmarshalObj.UnmarshalJSON(b); err != nil { 394 | return err 395 | } 396 | } else { 397 | return errors.New("Unknown type with GetActualInstance but no unmarshalObj.UnmarshalJSON defined") 398 | } 399 | } else if err = json.Unmarshal(b, v); err != nil { // simple model 400 | return err 401 | } 402 | return nil 403 | } 404 | return errors.New("undefined response type") 405 | } 406 | 407 | // Add a file to the multipart request 408 | func addFile(w *multipart.Writer, fieldName, path string) error { 409 | file, err := os.Open(path) 410 | if err != nil { 411 | return err 412 | } 413 | defer file.Close() 414 | 415 | part, err := w.CreateFormFile(fieldName, filepath.Base(path)) 416 | if err != nil { 417 | return err 418 | } 419 | _, err = io.Copy(part, file) 420 | 421 | return err 422 | } 423 | 424 | // Prevent trying to import "fmt" 425 | func reportError(format string, a ...interface{}) error { 426 | return fmt.Errorf(format, a...) 427 | } 428 | 429 | // A wrapper for strict JSON decoding 430 | func newStrictDecoder(data []byte) *json.Decoder { 431 | dec := json.NewDecoder(bytes.NewBuffer(data)) 432 | dec.DisallowUnknownFields() 433 | return dec 434 | } 435 | 436 | // Set request body from an interface{} 437 | func setBody(body interface{}, contentType string) (bodyBuf *bytes.Buffer, err error) { 438 | if bodyBuf == nil { 439 | bodyBuf = &bytes.Buffer{} 440 | } 441 | 442 | if reader, ok := body.(io.Reader); ok { 443 | _, err = bodyBuf.ReadFrom(reader) 444 | } else if fp, ok := body.(**os.File); ok { 445 | _, err = bodyBuf.ReadFrom(*fp) 446 | } else if b, ok := body.([]byte); ok { 447 | _, err = bodyBuf.Write(b) 448 | } else if s, ok := body.(string); ok { 449 | _, err = bodyBuf.WriteString(s) 450 | } else if s, ok := body.(*string); ok { 451 | _, err = bodyBuf.WriteString(*s) 452 | } else if jsonCheck.MatchString(contentType) { 453 | err = json.NewEncoder(bodyBuf).Encode(body) 454 | } else if xmlCheck.MatchString(contentType) { 455 | err = xml.NewEncoder(bodyBuf).Encode(body) 456 | } 457 | 458 | if err != nil { 459 | return nil, err 460 | } 461 | 462 | if bodyBuf.Len() == 0 { 463 | err = fmt.Errorf("Invalid body type %s\n", contentType) 464 | return nil, err 465 | } 466 | return bodyBuf, nil 467 | } 468 | 469 | // detectContentType method is used to figure out `Request.Body` content type for request header 470 | func detectContentType(body interface{}) string { 471 | contentType := "text/plain; charset=utf-8" 472 | kind := reflect.TypeOf(body).Kind() 473 | 474 | switch kind { 475 | case reflect.Struct, reflect.Map, reflect.Ptr: 476 | contentType = "application/json; charset=utf-8" 477 | case reflect.String: 478 | contentType = "text/plain; charset=utf-8" 479 | default: 480 | if b, ok := body.([]byte); ok { 481 | contentType = http.DetectContentType(b) 482 | } else if kind == reflect.Slice { 483 | contentType = "application/json; charset=utf-8" 484 | } 485 | } 486 | 487 | return contentType 488 | } 489 | 490 | // Ripped from https://github.com/gregjones/httpcache/blob/master/httpcache.go 491 | type cacheControl map[string]string 492 | 493 | func parseCacheControl(headers http.Header) cacheControl { 494 | cc := cacheControl{} 495 | ccHeader := headers.Get("Cache-Control") 496 | for _, part := range strings.Split(ccHeader, ",") { 497 | part = strings.Trim(part, " ") 498 | if part == "" { 499 | continue 500 | } 501 | if strings.ContainsRune(part, '=') { 502 | keyval := strings.Split(part, "=") 503 | cc[strings.Trim(keyval[0], " ")] = strings.Trim(keyval[1], ",") 504 | } else { 505 | cc[part] = "" 506 | } 507 | } 508 | return cc 509 | } 510 | 511 | // CacheExpires helper function to determine remaining time before repeating a request. 512 | func CacheExpires(r *http.Response) time.Time { 513 | // Figure out when the cache expires. 514 | var expires time.Time 515 | now, err := time.Parse(time.RFC1123, r.Header.Get("date")) 516 | if err != nil { 517 | return time.Now() 518 | } 519 | respCacheControl := parseCacheControl(r.Header) 520 | 521 | if maxAge, ok := respCacheControl["max-age"]; ok { 522 | lifetime, err := time.ParseDuration(maxAge + "s") 523 | if err != nil { 524 | expires = now 525 | } else { 526 | expires = now.Add(lifetime) 527 | } 528 | } else { 529 | expiresHeader := r.Header.Get("Expires") 530 | if expiresHeader != "" { 531 | expires, err = time.Parse(time.RFC1123, expiresHeader) 532 | if err != nil { 533 | expires = now 534 | } 535 | } 536 | } 537 | return expires 538 | } 539 | 540 | func strlen(s string) int { 541 | return utf8.RuneCountInString(s) 542 | } 543 | 544 | // GenericOpenAPIError Provides access to the body, error and model on returned errors. 545 | type GenericOpenAPIError struct { 546 | body []byte 547 | error string 548 | model interface{} 549 | } 550 | 551 | // Error returns non-empty string if there was an error. 552 | func (e GenericOpenAPIError) Error() string { 553 | return e.error 554 | } 555 | 556 | // Body returns the raw bytes of the response 557 | func (e GenericOpenAPIError) Body() []byte { 558 | return e.body 559 | } 560 | 561 | // Model returns the unpacked model of the error 562 | func (e GenericOpenAPIError) Model() interface{} { 563 | return e.model 564 | } 565 | --------------------------------------------------------------------------------