Git Product home page Git Product logo

anx-cli's Introduction

Anx Cli

Installation

npm install anx-cli -g

Dev Installation

git clone [email protected]:appnexus/anx-cli.git
cd <cloned folder>
npm link

Usage

Set Target

anx target hb.sand-08.adnxs.net

Production: api.appnexus.com
Development: hb.sand-08.adnxs.net

Login

anx login [optional username]

Generic GET and POST Commands

Requests can be manually constructed using the get and post commands.

Example

anx get "user?id=12"

Users Command

anx users

Command Result

Id Username        First Name      User Type
=============================================
1  tester          tester          bidder
2  albert          albert          admin
3  bill            bill            member
4  bert OmAos8r3vYlWV   member
...

[Records 1 to 25 of 6315] View More? (Y/n)

Command List

Usage: anx <command> [options]

Commands:

  get [url]              make a GET request to target
  post [url] [payload]   make a POST request to target
  advertiser [advertiser_id] get a single Advertiser record by Id
  advertisers [options]  get a list Advertiser records
  creative [creative_id] get a single Creative record by Id
  creatives [options]    get a list Creative records
  creative-custom-request-template [creative-custom-request-template_id] get a single Creative-custom-request-template record by Id
  creative-custom-request-templates [options]  get a list Creative-custom-request-template records
  member [member_id]     get a single Member record by Id
  members [options]      get a list Member records
  publisher [publisher_id] get a single Publisher record by Id
  publishers [options]   get a list Publisher records
  template [template_id] get a single Template record by Id
  templates [options]    get a list Template records
  user [user_id]         get a single User record by Id
  users [options]        get a list User records
  login [username]       run remote setup commands
  logout                 logout by removing session token
  switch-user [user_id]  switch session user
  target [url]           set target or view current target
  targets                list known targets

Options:

  -h, --help                 output usage information
  -V, --version              output the version number
  -s, --pagesize [pagesize]  page size (default 25)
  -t, --trace                print all http requests
  -j, --json                 print as json
  -f, --file <file>          post a file
  -m, --meta                 get meta data

Session

User targets and session tokens are kept in the user's home directory in the .anx-session file.

Example Session File

{
  "tokens": {
    "https://api.appnexus.com/": "token-sdf87sd9fa98f7as987",
    "http://hb.sand-08.adnxs.net/": "token-sfsdg6790s87dfg0sd8"
  },
  "target": "https://hb.sand-08.adnxs.net/",
  "username": "[email protected]"
}

anx-cli's People

Contributors

tsantef avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.