pixela-client-go

command module
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2019 License: MIT Imports: 3 Imported by: 0

README

pixela-client-go

Build Status Go Report Card Coverage Status

pixela-client-go is unofficial pixe.la API client & CLI written by golang.

pi is official CLI. Please use pi for proper usage.

This program build and check with Go 1.12 with go modules mode.

Synopsis

Create user (just one time)

First, create pixe.la user.

$ pixela user create USERNAME TOKEN

NOTE: pixe.la does not have user page nor user profile API. I recommend to take a note USERNAME and TOKEN.

Create graph (just one time)

Second, create graph.

$ pixela graph create GRAPH_ID GRAPH_NAME UNIT TYPE COLOR [TIMEZONE]

NOTE: some arguments are limited following values.

  • TYPE : int or float
  • COLOR : shibafu, momiji, sora, ichou, ajisai or kuro
  • TIMEZONE : default is UTC

And then you can see graph page.

If your username is foo and graph name is bar then graph page url will be https://pixe.la/v1/users/foo/graphs/bar.

Record quantity to graph

And last, this is daily work for recording quantity to graph.

You can also modify quantity same command. (because pixel/update API create pixel when pixel has not create yet.)

$ pixela pixel update GRAPH_ID DATE QUANTYTY --optionalData='{"key":"value", ...}'

NOTE:

  • DATE format is yyyyMMdd
  • --optionalData format is json up to 10KB

Usage

NAME:
    pixela - pixe.la client

USAGE:
    pixela [global options] command [command options] subcommand [subcommand options] [arguments...]

VERSION:
    0.0.6
    
AUTHOR:
    noissefnoc <noissefnoc@gmail.com>
    
COMMANDS:
    user    Create, Update token, Delete user
    graph   Create, Get definition, Get SVG data, Update definition, Delete graph, Get pixels date, Get detail URL
    pixel   Post, Get, Increment, Decrement, Update, Delete pixel
    webhook Create, Get, Invoke, Delete webhook

SUBCOMMANDS:
    user
        create Create user
        update Update user token
        delete Delete user
    graph
        create Create graph
        get    Get graph definitions (all graphs you created)
        svg    Get graph SVG format
        update Update graph definitions
        delete Delete graph
        pixels Get pixel regestored dates in the graph
        detail Get graph detail URL
    pixel
        post      Post pixel
        get       Get pixel's quantitiy and optional data
        increment Increment pixel quantity
        decrement Decrement pixel quantity
        update    Update pixel quantity and optionl data
        delete    Delete pixel
    webhook
        create Create webhook
        get    Get webhook
        invoke Invoke webhook
        delete Delete webhook

GLOBAL OPTIONS:
    --help, -h  show help

Installation

From Github release resource

Get from Github release page.

From homebrew (for macOS user)
$ brew install noissefnoc/tap/pixela
From source code
$ go get github.com/noissefnoc/pixela-client-go

License

This program is distributed under the MIT License. see LICENSE for more information.

Author

noissefnoc

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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