Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PHP Composer

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
# Docs: https://getcomposer.org/doc/articles/scripts.md

# - name: Run test suite
# run: composer run-script test
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,5 @@ Homestead.json

# Rocketeer PHP task runner and deployment package. https://github.com/rocketeers/rocketeer
.rocketeer/
/nbproject/private/
/nbproject/
9 changes: 9 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
language: php
php:
- '7.3'
sudo: required
before_script:
- composer install --prefer-source
notifications:
email:
- me@rodrigomanara.co.uk
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,25 @@
# News API SDK for PHP
Coming soon... this is where our officially supported SDK for PHP is going to live.
[![Build Status](https://travis-ci.org/rodrigomanara/News-API-php.svg?branch=master)](https://travis-ci.org/rodrigomanara/News-API-php.svg?branch=master)
[![Latest Stable Version](https://poser.pugx.org/rmanara/News-API-php/v/stable)](https://packagist.org/packages/rmanara/News-API-php)
[![License](https://poser.pugx.org/rmanara/News-API-php/license)](https://packagist.org/packages/rmanara/News-API-php)
[![Latest Unstable Version](https://poser.pugx.org/rmanara/News-API-php/v/unstable)](https://packagist.org/packages/rmanara/News-API-php)



# News API SDK for PHP

Search through millions of articles from over 30,000 large and small news sources and blogs. This includes breaking news as well as lesser articles.
find out more about it: [documentation](https://newsapi.org/docs/)

# Example
```
require_once __DIR__ . '/../vendor/autoload.php';

$api = new \NewsApi\Api( array('q' => 'Reino Unido' , 'language'=> 'pt' , 'apiKey' => newsapi));

$api->getData();
```

# Composer install

> composer require rmanara/news-api-php

***
20 changes: 20 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "rmanara/news-api-php",
"description": "Api call for newFeed",
"type": "library",
"authors": [
{
"name": "Rodrigo Manara",
"email": "me@rodrigomanara.co.uk"
}
],
"minimum-stability": "stable",
"autoload": {
"psr-4": {
"NewsApi\\": "src/"
}
},
"require-dev": {
"phpunit/phpunit": "^7.0"
}
}
Loading