2017 © Pedro Peláez
 

library docode-php

Library which consumes the https://docode.cl API

image

postedin/docode-php

Library which consumes the https://docode.cl API

  • Monday, February 12, 2018
  • by Robbo
  • Repository
  • 3 Watchers
  • 0 Stars
  • 152 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 1 % Grown

The README.md

Docode PHP

PHP library which consumes the https://docode.cl API, (*1)

Packagist Packagist CircleCI, (*2)

Installation

https://packagist.org/packages/postedin/docode-php, (*3)

composer require postedin/docode-php

Setup

You need to get your token manually. We don't support getting the token in this package since it requires the plain text username and password.
To get your token make a manual request to the Docode API with that information., (*4)

You can do this with curl in a terminal:, (*5)

curl -X POST -H "Content-Type:application/json" https://docode.cl/app/api/token -d '{"username": "YOUR USERNAME HERE", "password": "YOUR_PASSWORD_HERE"}'

Alternatively, we use https://insomnia.rest/ for testing the API and making manual requests., (*6)

Basic Usage

as taken from the examples directory, (*7)

<?php

use Postedin\Docode;

require __DIR__ . '/../vendor/autoload.php';

$api = new Docode\DocodeApi('token here');

$content = 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Maecenas accumsan, purus at dignissim convallis, nisi lacus pellentesque ligula, lobortis ornare lorem est eget nulla. Vestibulum ultrices, erat non consequat tincidunt, dolor justo consectetur nibh, non vehicula risus sem sit amet enim.';

// returns an instance of Docode\Analysis
$analysis = $api->createAnalysis('test-example.txt', $content, 'http://postedin.test/callback-url/')->analyseWeb();

// At this point docode will be analysing your content and when done send results to your callback URL. 
// You also have the data from the request as objects from this library. 

// You can get the results manually by doing...
$newResponseAnalysis = $api->getAnalysis($analysis->id);

// if docode is done this will contain the results, if any

The Versions

12/02 2018

dev-master

9999999-dev

Library which consumes the https://docode.cl API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Postedin SpA

api library docode

12/02 2018

1.0.0-beta2

1.0.0.0-beta2

Library which consumes the https://docode.cl API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Postedin SpA

api library docode

19/12 2017

1.0.0-beta1

1.0.0.0-beta1

Library which consumes the https://docode.cl API

  Sources   Download

MIT

The Requires

 

The Development Requires

by Postedin SpA

api library docode