Code Monkey home page Code Monkey logo

po.et's Introduction

Po.et PHP Composer Package

Usage

Refer frost before you start: https://docs.frost.po.et/docs/getting-started

Install

composer require jellybool/po.et

Methods

1.createWork

// You can get your apiToken from here: https://frost.po.et/token
$poet = new \JellyBool\Poet\Client($apiToken);

$work = $poet->createWork([
    'name' => 'PHP Poet',
    'datePublished' => '2018-02-12T16:39:46+00:00',
    'dateCreated' => '2018-02-12T14:39:46+00:00',
    'author' => 'JellyBool',
    'tags' => 'php',
    'content' => 'Po.et PHP Integrations'
]);

It returns an array contains workId:

['workId' => '5e11b417b01f0db810d81f7a8f3cbdd13c9b876512a9f26dbd7d380573c700d0']

2.getWork

$poet = new \JellyBool\Poet\Client($apiToken);

$work = $poet->getWork($workId);

It returns an array contains work details :

[
  'name' => "PHP Poet"
  'datePublished' => "2018-02-12T16:39:46+00:00"
  'dateCreated' => "2018-02-12T14:39:46+00:00"
  'author' => "JellyBool"
  'tags' => "php"
  'content' => "Po.et PHP Integrations"
];

3.getAllWorks

$poet = new \JellyBool\Poet\Client($apiToken);

$work = $poet->getAllWorks();

It returns a collection of each work details array :

[
    [
      'name' => "PHP Poet"
      'datePublished' => "2018-02-12T16:39:46+00:00"
      'dateCreated' => "2018-02-12T14:39:46+00:00"
      'author' => "JellyBool"
      'tags' => "php"
      'content' => "Po.et PHP Integrations"
    ],
    [
      'name' => "PHP Poet 2"
      'datePublished' => "2018-02-12T17:39:46+00:00"
      'dateCreated' => "2018-02-12T15:39:46+00:00"
      'author' => "JellyBool"
      'tags' => "po.et"
      'content' => "Po.et interactions with PHP"
    ],
];

License

MIT License.

po.et's People

Contributors

jellybool avatar

Stargazers

Benjamin Nelan avatar Jeremy Tubbs avatar

Watchers

James Cloos avatar  avatar  avatar

Forkers

sthrn

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.