Coder Social home page Coder Social logo

destiny2-php's People

Contributors

richard4339 avatar withgod avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

withgod michabbb

destiny2-php's Issues

Installation

Hello,

I was wanting to provision this on a server, but I'm a little confused on how to get it going. I'm running PHP7 on my server, and have ran the composer command:

$ composer require richard4339/destiny2-php
Using version ^0.2.4 for richard4339/destiny2-php
./composer.json has been created
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 5 installs, 0 updates, 0 removals
  - Installing guzzlehttp/promises (v1.3.1): Downloading (100%)         
  - Installing psr/http-message (1.0.1): Downloading (100%)         
  - Installing guzzlehttp/psr7 (1.4.2): Downloading (100%)         
  - Installing guzzlehttp/guzzle (6.3.3): Downloading (100%)         
  - Installing richard4339/destiny2-php (v0.2.4): Downloading (100%)         
guzzlehttp/guzzle suggests installing psr/log (Required for using the Log middleware)
Writing lock file
Generating autoload files

After this part, I'm not sure what I need to do. It seems to have only created a vendor directory on the server. Do you mind elaborating a bit on how to get this up and going? I'm essentially just wanting to create a simple website/app with Xur information (location/stock). Thanks!

Use httpClient more effectively

I set the internalRequest method to not re-instantiate httpClient if it already existed. I added this because when running commands back to back you can hit the recursion limit in xdebug easily due to it stacking all of the plugins for every call. However, doing so breaks our tests. How should this be handled?

Provide a better method for handling the $body argument

The $body argument in internalRequest should be handled better.

Currently, it is performing a json_encode if the argument is of the type array. If you want to hand it form data as would be required for an oauth request it has to encoded beforehand.

http_build_query(
    ['example' => 'form data']
    , '', '&')

You can't test the $body argument at the last minute because both the json encoded string and the string above are both strings.

This could simply be written to work like Guzzle where the body for a form should be wrapped in the array form_params. At that point, would it be better to potentially have json encoded body to be wrapped in the an array with key json (again mimicking Guzzle), as seen below?

[
    'json' =>
        [
            'message' => ''
        ]
]);

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.