Skip to content

Commit

Permalink
update v1.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
Tri committed Aug 19, 2021
1 parent f62cc50 commit ef62a0e
Show file tree
Hide file tree
Showing 121 changed files with 1,418 additions and 273 deletions.
6 changes: 3 additions & 3 deletions .openapi-generator/FILES
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ docs/Model/AggregateIndicators.md
docs/Model/BasicFinancials.md
docs/Model/BreakdownItem.md
docs/Model/Company.md
docs/Model/CompanyESG.md
docs/Model/CompanyExecutive.md
docs/Model/CompanyNews.md
docs/Model/CompanyNewsStatistics.md
Expand Down Expand Up @@ -115,6 +116,7 @@ lib/Model/AggregateIndicators.php
lib/Model/BasicFinancials.php
lib/Model/BreakdownItem.php
lib/Model/Company.php
lib/Model/CompanyESG.php
lib/Model/CompanyExecutive.php
lib/Model/CompanyNews.php
lib/Model/CompanyNewsStatistics.php
Expand Down Expand Up @@ -217,6 +219,4 @@ lib/Model/TwitterSentimentContent.php
lib/Model/UpgradeDowngrade.php
lib/ObjectSerializer.php
phpunit.xml.dist
test/Model/EarningsEstimatesInfoTest.php
test/Model/RevenueEstimatesInfoTest.php
test/Model/SimilarityIndexInfoTest.php
test/Model/CompanyESGTest.php
2 changes: 1 addition & 1 deletion .openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.2.0
5.2.1
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ language: php
# https://docs.travis-ci.com/user/reference/bionic/#php-support
dist: bionic
php:
- 7.2
- 7.3
- 7.4
before_install: "composer install"
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Finnhub

- Finnhub php api clent
- API version: 1.0.0
- Package version: 1.1.4
- Package version: 1.1.5

## Requirements

Expand All @@ -10,11 +11,13 @@ PHP 5.5 and later
## Installation & Usage

### Composer

In composer.json:

```json
{
"require": {
"finnhub/client": "1.1.4"
"finnhub/client": "1.1.5"
}
}
```
Expand Down Expand Up @@ -230,6 +233,9 @@ print_r($client->similarityIndex($symbol = "AAPL"));
//Symbol Search
print_r($client->symbolSearch("AAPL"));

//Company ESG
print_r($client->companyEsgScore("AAPL"));

?>
```

Expand Down
76 changes: 40 additions & 36 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,43 @@
{
"name": "finnhub/client",
"version": "1.1.4",
"description": "Official Finnhub stock API PHP library. https://finnhub.io/",
"keywords": [
"openapitools",
"openapi-generator",
"openapi",
"php",
"sdk",
"rest",
"api"
],
"homepage": "https://openapi-generator.tech",
"license": "unlicense",
"authors": [
{
"name": "OpenAPI-Generator contributors",
"homepage": "https://openapi-generator.tech"
}
],
"require": {
"php": ">=7.2",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^6.2"
},
"require-dev": {
"phpunit/phpunit": "^8.0 || ^9.0",
"friendsofphp/php-cs-fixer": "^2.12"
},
"autoload": {
"psr-4": { "Finnhub\\" : "lib/" }
},
"autoload-dev": {
"psr-4": { "Finnhub\\Test\\" : "test/" }
"name": "finnhub/client",
"version": "1.1.5",
"description": "Official Finnhub stock API PHP library. https://finnhub.io/",
"keywords": [
"openapitools",
"openapi-generator",
"openapi",
"php",
"sdk",
"rest",
"api"
],
"homepage": "https://openapi-generator.tech",
"license": "unlicense",
"authors": [
{
"name": "OpenAPI-Generator contributors",
"homepage": "https://openapi-generator.tech"
}
],
"require": {
"php": "^7.3 || ^8.0",
"ext-curl": "*",
"ext-json": "*",
"ext-mbstring": "*",
"guzzlehttp/guzzle": "^6.2"
},
"require-dev": {
"phpunit/phpunit": "^8.0 || ^9.0",
"friendsofphp/php-cs-fixer": "^2.12"
},
"autoload": {
"psr-4": {
"Finnhub\\": "lib/"
}
},
"autoload-dev": {
"psr-4": {
"Finnhub\\Test\\": "test/"
}
}
}
63 changes: 63 additions & 0 deletions docs/Api/DefaultApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Method | HTTP request | Description
[**companyBasicFinancials()**](DefaultApi.md#companyBasicFinancials) | **GET** /stock/metric | Basic Financials
[**companyEarnings()**](DefaultApi.md#companyEarnings) | **GET** /stock/earnings | Earnings Surprises
[**companyEpsEstimates()**](DefaultApi.md#companyEpsEstimates) | **GET** /stock/eps-estimate | Earnings Estimates
[**companyEsgScore()**](DefaultApi.md#companyEsgScore) | **GET** /stock/esg | Company ESG Scores
[**companyExecutive()**](DefaultApi.md#companyExecutive) | **GET** /stock/executive | Company Executive
[**companyNews()**](DefaultApi.md#companyNews) | **GET** /company-news | Company News
[**companyPeers()**](DefaultApi.md#companyPeers) | **GET** /stock/peers | Peers
Expand Down Expand Up @@ -331,6 +332,68 @@ Name | Type | Description | Notes
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `companyEsgScore()`

```php
companyEsgScore($symbol): \Finnhub\Model\CompanyESG
```

Company ESG Scores

<p>This endpoint provides ESG scores and important indicators for 1000+ global companies. The data is collected through company's public ESG disclosure and public sources.</p><p>Our ESG scoring models takes into account more than 150 different inputs to calculate the level of ESG risks and how well a company is managing them. A higher score means lower ESG risk or better ESG management. ESG scores are in the the range of 0-100. Some key indicators might contain letter-grade score from C- to A+ with C- is the lowest score and A+ is the highest score.</p>

### Example

```php
<?php
require_once(__DIR__ . '/vendor/autoload.php');


// Configure API key authorization: api_key
$config = Finnhub\Configuration::getDefaultConfiguration()->setApiKey('token', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = Finnhub\Configuration::getDefaultConfiguration()->setApiKeyPrefix('token', 'Bearer');


$apiInstance = new Finnhub\Api\DefaultApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$symbol = 'symbol_example'; // string | Symbol.

try {
$result = $apiInstance->companyEsgScore($symbol);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->companyEsgScore: ', $e->getMessage(), PHP_EOL;
}
```

### Parameters

Name | Type | Description | Notes
------------- | ------------- | ------------- | -------------
**symbol** | **string**| Symbol. |

### Return type

[**\Finnhub\Model\CompanyESG**](../Model/CompanyESG.md)

### Authorization

[api_key](../../README.md#api_key)

### HTTP request headers

- **Content-Type**: Not defined
- **Accept**: `application/json`

[[Back to top]](#) [[Back to API list]](../../README.md#endpoints)
[[Back to Model list]](../../README.md#models)
[[Back to README]](../../README.md)

## `companyExecutive()`

```php
Expand Down
14 changes: 14 additions & 0 deletions docs/Model/CompanyESG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# # CompanyESG

## Properties

Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**symbol** | **string** | symbol | [optional]
**total_esg_score** | **float** | Total ESG Score | [optional]
**environment_score** | **float** | symbol | [optional]
**governance_score** | **float** | symbol | [optional]
**social_score** | **float** | symbol | [optional]
**data** | **object** | | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/HistoricalNBBO.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ Name | Type | Description | Notes
**b** | **float[]** | List of Bid price data. | [optional]
**bx** | **string[]** | List of venues/exchanges - Bid price. A list of exchange codes can be found &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1Tj53M1svmr-hfEtbk6_NpVR1yAyGLMaH6ByYU6CG0ZY/edit?usp&#x3D;sharing\&quot;,&gt;here&lt;/a&gt; | [optional]
**t** | **int[]** | List of timestamp in UNIX ms. | [optional]
**c** | [**string[][]**](array.md) | List of quote conditions. A comprehensive list of quote conditions code can be found &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1iiA6e7Osdtai0oPMOUzgAIKXCsay89dFDmsegz6OpEg/edit?usp&#x3D;sharing\&quot;&gt;here&lt;/a&gt; | [optional]
**c** | **string[][]** | List of quote conditions. A comprehensive list of quote conditions code can be found &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1iiA6e7Osdtai0oPMOUzgAIKXCsay89dFDmsegz6OpEg/edit?usp&#x3D;sharing\&quot;&gt;here&lt;/a&gt; | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
6 changes: 6 additions & 0 deletions docs/Model/KeyCustomersSuppliers.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,11 @@ Name | Type | Description | Notes
**name** | **string** | Name | [optional]
**customer** | **bool** | Whether the company is a customer. | [optional]
**supplier** | **bool** | Whether the company is a supplier | [optional]
**one_month_correlation** | **float** | 1-month price correlation | [optional]
**one_year_correlation** | **float** | 1-year price correlation | [optional]
**six_month_correlation** | **float** | 6-month price correlation | [optional]
**three_month_correlation** | **float** | 3-month price correlation | [optional]
**two_week_correlation** | **float** | 2-week price correlation | [optional]
**two_year_correlation** | **float** | 2-year price correlation | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
2 changes: 1 addition & 1 deletion docs/Model/TickData.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Name | Type | Description | Notes
**p** | **float[]** | List of price data. | [optional]
**t** | **int[]** | List of timestamp in UNIX ms. | [optional]
**x** | **string[]** | List of venues/exchanges. A list of exchange codes can be found &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1Tj53M1svmr-hfEtbk6_NpVR1yAyGLMaH6ByYU6CG0ZY/edit?usp&#x3D;sharing\&quot;,&gt;here&lt;/a&gt; | [optional]
**c** | [**string[][]**](array.md) | List of trade conditions. A comprehensive list of trade conditions code can be found &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1PUxiSWPHSODbaTaoL2Vef6DgU-yFtlRGZf19oBb9Hp0/edit?usp&#x3D;sharing\&quot;&gt;here&lt;/a&gt; | [optional]
**c** | **string[][]** | List of trade conditions. A comprehensive list of trade conditions code can be found &lt;a target&#x3D;\&quot;_blank\&quot; href&#x3D;\&quot;https://docs.google.com/spreadsheets/d/1PUxiSWPHSODbaTaoL2Vef6DgU-yFtlRGZf19oBb9Hp0/edit?usp&#x3D;sharing\&quot;&gt;here&lt;/a&gt; | [optional]

[[Back to Model list]](../../README.md#models) [[Back to API list]](../../README.md#endpoints) [[Back to README]](../../README.md)
Loading

0 comments on commit ef62a0e

Please sign in to comment.