2017 © Pedro Peláez
 

library afterthedeadline

Afterthedeadline API wrapper

image

robbiep/afterthedeadline

Afterthedeadline API wrapper

  • Monday, July 24, 2017
  • by robbiepaul
  • Repository
  • 1 Watchers
  • 1 Stars
  • 16 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 15 Versions
  • 0 % Grown

The README.md

After The Deadline API PHP Wrapper

Latest Stable Version Total Downloads Latest Unstable Version License StyleCI, (*1)

This is a PHP wrapper for the After the Deadline API, (*2)

After the Deadline is a language checker for the web with: Contextual Spell Checking, Advanced Style Checking and Intelligent Grammar Checking, (*3)

Installation

Install this package through Composer., (*4)

Add this to your composer.json dependencies:, (*5)

"require": {
   "robbiep/afterthedeadline": "^0.0"
}

Run composer install to download the required files., (*6)

Usage

require_once('vendor/autoload.php');

$atd = new \RobbieP\Afterthedeadline\Afterthedeadline(['key' => md5('<unique string>')]);

$atd->checkDocument("I started my schooling as the majority did in my area, at the local primarry school.");

# `getResults` will return an array of objects (Spelling, Grammar, Suggestion) or `false` if there were no results
$results = $atd->getResults();

# (Optionally) you can get formatted text back where the results have been wrapped with 
# <span class="atd-{type}" data-suggestions="{suggestions}">word</span>

echo $atd->getFormatted(); 

Results in:, (*7)



I started my schooling as the majority did in my area, at the local primarry school.

(Experimental) I've written some basic JavaScript using jQuery and Bootstrap to provide a simple UI to correct/ignore the results, (*8)

echo $m->getFormatted()->getStylesAndScript(); ?>

Support for other languages

At the moment After the Deadline supports English by default but German de, French fr, Spanish es, Portugese pt, (*9)

You can either set it in the constructor:, (*10)

$atd = new \RobbieP\Afterthedeadline\Afterthedeadline(['key' => md5('<unique string>'), 'lang' => 'de']);
# You must use 2 letter country code

Or you can set it inline:, (*11)

$atd = new \RobbieP\Afterthedeadline\Afterthedeadline(['key' => md5('<unique string>')]);
$atd->setLanguage(\RobbieP\Afterthedeadline\Language::GERMAN);

If you're using it in Laravel...

I've included a ServiceProvider class and a config if you need to change any options. You need to add the ServiceProvider to config/app.php, (*12)

'providers' => array(
    ...
    RobbieP\Afterthedeadline\AfterthedeadlineServiceProvider::class
)

If you want to use the Facade:, (*13)

'aliases' => array(
    ...
    'Afterthedeadline' => RobbieP\Afterthedeadline\Facades\Afterthedeadline::class,
)

You will need to publish the config php artisan vendor:publish put your self generated API key in there., (*14)

Usage (in Laravel)

$results = \Afterthedeadline::checkDocument("some content")
                            ->getResults();

Contributing

  1. Fork it
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request

The Versions

24/07 2017

dev-master

9999999-dev https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

02/02 2016

dev-analysis-zOMv3l

dev-analysis-zOMv3l https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

16/01 2016

0.0.13

0.0.13.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

16/01 2016

0.0.12

0.0.12.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

14/01 2016

0.0.11

0.0.11.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

14/01 2016

0.0.10

0.0.10.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

13/01 2016

0.0.9

0.0.9.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

13/01 2016

0.0.8

0.0.8.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

12/01 2016

0.0.7

0.0.7.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

11/01 2016

0.0.6

0.0.6.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

11/01 2016

0.0.5

0.0.5.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

11/01 2016

0.0.4

0.0.4.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

11/01 2016

0.0.3

0.0.3.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

11/01 2016

0.0.2

0.0.2.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline

10/01 2016

0.0.1

0.0.1.0 https://github.com/robbiepaul/afterthedeadline

Afterthedeadline API wrapper

  Sources   Download

MIT

The Requires

 

The Development Requires

by Robbie Paul

grammar spellchecker afterthedeadline