Giter Club home page Giter Club logo

harvest-forecast's Introduction

Harvest Forecast API Client (PHP)

A Forecast API Wrapper, please note that there is currently no official public API. However this API client has been made by inspecting network traffic from their web client.

Installation

You can install this package through composer, the easiest way is to:

composer require xvilo/harvest-forecast

You will also need an implementation of php-http/client-implementation.

Getting Started

You will need an API access token, you can obtain one from Harvest Developers. Please create a new access token and save this.

Usage

<?php
declare(strict_types=1);   

// This file is generated by Composer
require_once __DIR__ . '/vendor/autoload.php';

// Create Client Instance
$client = new \Harvest\Forecast\Client();

// Authenticate
$client->authenticate('1622120.xx._xyzabcdefghijklmnopqrstuvw', 123456);

// Call endpoint
$whoAmI = $client->user->whoAmI();
echo json_encode ( $whoAmI, JSON_PRETTY_PRINT );

FAQ

php-http/client-implementation needed

If you try to install this package and get the following error:

xvilo/harvest-forecast 1.0.0 requires php-http/client-implementation ^1.0 -> no matching package found

Please install a PHP HTTP library such as Guzzle or Symfony HttpClient Component:

composer require symfony/http-client

or

composer require php-http/guzzle6-adapter

harvest-forecast's People

Contributors

alexwass-lr avatar samuele-mattiuzzo avatar tomjn avatar xvilo avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

harvest-forecast's Issues

invalid-token error

I am using correct token and account ID of harvest. I am using same for restAPI that token and account ID working but in the forecast getting error invalid token.

I used toke with Bearer and without Bearer as well.. but didn't work.

I am running project PHP 8.0.3 independently.

I need to get project list from Harvest forecast.

kindly guide me what is issue.
@xvilo @samuele-mattiuzzo

General question on Forecast API

I noticed that none of the unofficial APIs listed here seem to have any Create, Update, or Delete methods of any of the types they support. But I noticed that this one was the only one that had post/put/patch/delete in the class that handles HTTP calls. I went to the forecast frontend recorded myself doing some assignments and different things and then I went to implement them and I always seemed to get a 500. I tried adding all the same headers etc... @xvilo did you ever try to implement this and did you run into the same thing? If so how far did you go (i.e. talk to harvest support)?

package is not available in a stable-enough version

I am getting this error while installing these Packages in the larvel.

Potential causes:

Read https://getcomposer.org/doc/articles/troubleshooting.md for further common problems.
@xvilo @samuele-mattiuzzo

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.