Giter Site home page Giter Site logo

fogbugz-php-api's Introduction

FogBugz PHP API Maintainability Test Coverage Build Status

PHP Wrapper for FogBugz 8 XML API

See the api documentation at XML API Documentation

This is a small API used to wrap up the FogBugz API into an easy to call object. It allows access to all of the API commands exposed by FogBugz, and returns a SimpleXMLElement object for any commands that return data.

FogBugz CLI

This project was written in support for a FogBugz command line client. Check out my repo at there4/fogbugz-php-cli for a working command line tool for FogBugz. You can notate cases, track time working, and review histories. Try it, you'll like it.

Sample Code

<?php
use There4\FogBugz;
$fogbugz = new FogBugz\Api(
    '[email protected]',
    'password',
    'http://example.fogbugz.com'
);
$fogbugz->logon();
$fogbugz->startWork(array(
    'ixBug' => 23442
));

Sample Code 2 (using FogBugz' API Token)

<?php
use There4\FogBugz;
$fogbugz = new FogBugz\Api(
    '',
    '',
    'http://example.fogbugz.com'
);
$fogbugz->setToken('your_token');
$fogbugz->startWork(array(
    'ixBug' => 23442
));

Magic Methods

The API uses __call() to make a method for each api endpoint in the FogBugz API. For example, to call the stopWork api endpoint, simple call a method on the fogbugz object $fogbugz->stopWork(). If you want to call the api with specific parameters, supply those to the function as an associative array, as in the sample above.

Return Format

Remember that the api methods return SimpleXMLElement objects. See the sample.php file for an example of this.

Changelog

  • 1.0.4: Add setProxy() method to the Curl class
  • 1.0.5: Add setToken() method to the Api class
  • 2.0.0: Upgrade to PHP7 only in testing and update tooling

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.