https://github.com/there4/fogbugz-php-api
PHP Wrapper for FogBugz 8 XML API
https://github.com/there4/fogbugz-php-api
Last synced: about 1 year ago
JSON representation
PHP Wrapper for FogBugz 8 XML API
- Host: GitHub
- URL: https://github.com/there4/fogbugz-php-api
- Owner: there4
- Created: 2011-01-15T13:06:06.000Z (over 15 years ago)
- Default Branch: master
- Last Pushed: 2020-10-01T22:38:31.000Z (over 5 years ago)
- Last Synced: 2025-03-27T16:50:36.794Z (about 1 year ago)
- Language: PHP
- Homepage:
- Size: 75.2 KB
- Stars: 17
- Watchers: 7
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FogBugz PHP API [](https://codeclimate.com/github/there4/fogbugz-php-api/maintainability) [](https://codeclimate.com/github/there4/fogbugz-php-api/test_coverage) [](https://travis-ci.org/there4/fogbugz-php-api)
> PHP Wrapper for FogBugz 8 XML API
See the api documentation at [XML API Documentation][api-docs]
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](https://github.com/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
logon();
$fogbugz->startWork(array(
'ixBug' => 23442
));
```
## Sample Code 2 (using FogBugz' API Token)
```php
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
[api-docs]: https://support.fogbugz.com/hc/en-us/sections/360002378313