there4 / fogbugz-php-api Goto Github PK
View Code? Open in Web Editor NEWPHP Wrapper for FogBugz 8 XML API
PHP Wrapper for FogBugz 8 XML API
Hi all
There is a function named logoff()
in Api.php
. This function send logoff command and clear our $token
var.
But the problem is that you don't use this function in your sample.php
.
Thanks.
Hi,
Nice & well organized code.
I wasn't feeling ok saving my user/email + pwd in the files.
So I created the following method and supply it with the token that I generated from the FogBugz control panel.
public function set_token($token) {
$this->token = (string) $token;
}
From FogBugz:
We have an update coming soon to the FogBugz XML API which changes a default behavior. We have not designated this as a breaking change because we designed it not to impact any accounts with normal usage. (i.e. the major version and minversion reported by api.xml will not change) It is important, however, for makers of applications and libraries to verify that case searches and filters are not requesting too many cases back from FogBugz.
Currently, if you do not specify a 'max' parameter when you use the 'search' or 'listCases' commands, FogBugz returns all matching results. In practice, we find that requests often time out for more than around 10,000 cases so there is a de facto limit which depends on the query. When we roll this change out to FogBugz On Demand accounts, the default behavior when no 'max' parameter is given or max is set to 0 will be to limit the results to 50,000 cases. In our testing, asking for more than 100,000 cases causes undue load on our servers and can negatively impact other accounts, so we now return an error (code 30) for anything more than 'max=100000'.
Please take a look at your code and, if possible, ensure that it is setting a value for the 'max' parameter. If the user is able to set a max, make sure your code passes the error code 30 along to them if they ask for more than 100,000 results.
So I have been using the fogbugz API to call methods to retrieve data and everything works fine , except that there's something that I do not understand, When I see what is contained in the XML file, I have this time of format for listintervals for a particular user , the ixinterval tag contains a very big number like the first one has 5430 and I was expecting it to be hours , like 2 or 2.5, etc .. Can someone explain what that interval number means because on the fogbugz API documentation , the numbers are much smaller and represent hours and I'm pretty sure I didn't work that many hours on these projects. .. I'd really appreciate your help in this.
<interval>
<ixInterval>5430</ixInterval>
<ixPerson>96</ixPerson>
<ixBug>12250</ixBug>
<dtStart>2014-12-31T18:00:00Z</dtStart>
<dtEnd>2014-12-31T23:00:00Z</dtEnd>
<fDeleted>false</fDeleted>
<sTitle>
<![CDATA[
err page when login to facebook account from upload photo
]]>
</sTitle>
</interval>
<interval>
<ixInterval>5462</ixInterval>
<ixPerson>96</ixPerson>
<ixBug>12479</ixBug>
<dtStart>2015-01-02T18:00:00Z</dtStart>
<dtEnd>2015-01-02T21:14:00Z</dtEnd>
<fDeleted>false</fDeleted>
<sTitle>
<![CDATA[
Cannot See the Front of an Easel in My Orders
]]>
</sTitle>
</interval>
Hi,
I've started using your code through Packagist in a Symfony project. My Internal work network unfortunately uses a very aggressive proxy server set-up, which means I need to be able to pass proxy credentials though with each of the curl requests. Obviously modifying your downloaded code in the vendor folder of the Symfony project isn't ideal.
As I see it there are 2 possible solutions to the situation, currently the way you reference the 'curl' object in the main Fogbugz/Api class is via a public object, this allows me to overload it with my own implementation. Ideally I don't want to completely copy the code in case you put improvements in there, so the logical solution with that is to extend your 'Curl' class with my own, that implements a constructor which sets the proxy details via the curl_setopt function calls, however currently your $_ch parameter is set to 'private' rather than 'protected', which means that won't work.
The other solution would be for you to allow the option to set proxy data into the curl class itself via function calls (or optional construct parameters?).
Currently the code to set the proxy for my implementation is:
curl_setopt($this->_ch, CURLOPT_PROXY, "{$proxy_ip_address}:{$proxy_port}");
curl_setopt($this->_ch, CURLOPT_PROXYUSERPWD, "{$username}:{$password}");
Could this be implemented, or would you like me to do a pull request, implement the changes myself and then re-integrate that back into the core release? If so, which solution do you prefer?
Thanks,
John
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.