Skip to content
This repository was archived by the owner on Jan 7, 2022. It is now read-only.

Commit 578b2fe

Browse files
committed
v1.0
- Update package to have minimum support of php > 7.1.3 - Add ability to set a custom timeout for all requests; defaults to (4) - Add extra api calls for getScales - Add missing endPointUrl for PrintNode\Scale
1 parent 960acab commit 578b2fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+7822
-629
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 2
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.php]
15+
indent_size = 4

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/node_modules
2+
/public/hot
3+
/public/storage
4+
/storage/*.key
5+
/vendor
6+
.env
7+
.env.backup
8+
.phpunit.result.cache
9+
Homestead.json
10+
Homestead.yaml
11+
npm-debug.log
12+
yarn-error.log
13+
cghooks.lock
14+
.DS_Store

.php_cs

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?php
2+
3+
$finder = Symfony\Component\Finder\Finder::create()
4+
->notPath('bootstrap/cache')
5+
->notPath('storage')
6+
->notPath('vendor')
7+
->in(__DIR__)
8+
->name('*.php')
9+
->notName('*.blade.php')
10+
->ignoreDotFiles(true)
11+
->ignoreVCS(true);
12+
13+
$rules = [
14+
'@Symfony' => true,
15+
'array_syntax' => ['syntax' => 'short'],
16+
'linebreak_after_opening_tag' => true,
17+
'not_operator_with_successor_space' => true,
18+
'ordered_imports' => ['sort_algorithm' => 'length'],
19+
'phpdoc_order' => true,
20+
'phpdoc_no_empty_return' => false,
21+
'array_indentation' => true,
22+
'yoda_style' => false
23+
];
24+
25+
return PhpCsFixer\Config::create()
26+
->setRules($rules)
27+
->setFinder($finder)
28+
->setUsingCache(false);

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Changelog
2+
3+
## [1.0.0] - 2019-09-08
4+
5+
### Added
6+
- Ability to set a custom timeout for all requests; defaults to (4)
7+
- Add extra api calls for getScales
8+
9+
### Changed
10+
- Forked from printnode/printnode-php
11+
- Update package to have minimum support of php > 7.1.3
12+
13+
### Fixed
14+
- Add missing endPointUrl for PrintNode\Scale
15+
16+
[1.0.0]: https://github.com/culturekings/printnode-php/compare/1.0.0...1.0.0

README.md

Lines changed: 24 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,40 @@
1-
PrintNode-PHP
1+
🚀 PrintNode for PHP
22
=============
33

4+
[![GitHub Release][ico-release]][link-github-release]
5+
[![License][ico-license]](LICENSE)
6+
7+
## Disclaimer
8+
This package was originally maintained by [PrintNode](https://github.com/PrintNode/PrintNode-PHP) but is now currently unmaintained.
9+
10+
All credits go to the team @ [printnode.com](https://www.printnode.com/en)
11+
12+
## Introduction
13+
414
PrintNode is a cloud printing services which allows you to connect any printer to your application using our PrintNode Client and easy to use JSON API.
515

616
See www.printnode.com for more information.
717

818
This quick start guide covers using the PHP API library. It shows how to find which Computers and Printers you have available for printing and how you can submit PrintJobs using the provided PHP API libraries.
919

10-
## Step 1: Sign Up
11-
Before you can use the API, you will need to sign up to PrintNode account, and make a new API key. You can sign up here https://app.printnode.com/account/register
20+
## Installation
1221

13-
## Step 2: Add a computer and printer
14-
To have somewhere to print to you need to download and install the PrintNode desktop client on a computer with some printers. You can download the PrintNode Client installer here - www.printnode.com/download . It should be intuitive to setup but for more detailed instructions please see here: https://www.printnode.com/docs/installation/windows/ .
15-
16-
## Step 3: Install library
17-
18-
### Download the PHP Library
19-
You can download the client from our Github account. If you have a git client installed locally, you can clone our repository
22+
### Sign Up
23+
Before you can use the API, you will need to sign up to PrintNode account, and make a new API key. You can sign up here https://app.printnode.com/account/register
2024

21-
https://github.com/PrintNode/PrintNode-PHP/archive/master.zip
25+
### Add a computer and printer
26+
To have somewhere to print to you need to download and install the PrintNode desktop client on a computer with some printers. You can download the PrintNode Client installer here - www.printnode.com/download . It should be intuitive to setup but for more detailed instructions please see here: https://www.printnode.com/docs/installation/windows/.
2227

23-
### Install via composer
28+
### Composer
2429

2530
```bash
26-
composer require PrintNode/printnode-php:dev-master
31+
$ composer require culturekings/printnode-php
2732
```
2833

29-
## Step 4: See examples how to use this library
34+
## Examples
35+
36+
See the [./examples](./examples) directory to learn how to use this library.
3037

31-
See `examples` directory to learn how to use this library.
38+
[ico-release]: https://img.shields.io/github/tag/culturekings/printnode-php.svg
39+
[ico-license]: https://img.shields.io/badge/license-MIT-brightgreen.svg
40+
[link-github-release]: https://github.com/culturekings/printnode-php/releases

codeception.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
paths:
2+
tests: tests
3+
output: tests/_output
4+
data: tests/_data
5+
support: tests/_support
6+
envs: tests/_envs
7+
actor_suffix: Tester
8+
extensions:
9+
enabled:
10+
- Codeception\Extension\RunFailed

composer.json

Lines changed: 25 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,28 @@
11
{
2-
"name": "printnode/printnode-php",
3-
"description": "Connect any printer to your application with PrintNode Client and easy to use JSON API",
4-
"require": {
5-
"php": ">=5.3.2",
6-
"ext-curl": "*"
7-
},
8-
"keywords": [
9-
"php",
10-
"PrintNode",
11-
"API",
12-
"printing"
13-
],
14-
"homepage": "https://github.com/PrintNode/PrintNode-PHP",
15-
"authors": [{
16-
"email": "support@printnode.com",
17-
"name": "Contributors",
18-
"homepage": "https://www.printnode.com"
19-
}],
20-
"autoload": {
21-
"psr-4": {
22-
"PrintNode\\": "src/PrintNode"
23-
}
2+
"name": "culturekings/printnode-php",
3+
"description": "Connect any printer to your application with PrintNode Client and easy to use JSON API",
4+
"require": {
5+
"php": "> 7.1.3",
6+
"ext-curl": "*",
7+
"codeception/codeception": "^3.1"
8+
},
9+
"keywords": [
10+
"php",
11+
"PrintNode",
12+
"API",
13+
"printing"
14+
],
15+
"homepage": "https://github.com/culturekings/printnode-php",
16+
"authors": [
17+
{
18+
"email": "support@printnode.com",
19+
"name": "Contributors",
20+
"homepage": "https://www.printnode.com"
2421
}
22+
],
23+
"autoload": {
24+
"psr-4": {
25+
"PrintNode\\": "src/PrintNode"
26+
}
27+
}
2528
}

0 commit comments

Comments
 (0)