api

To get reference counting, do I have to clutter my APIs with shared_ptr?

I recently had the following memory bug, which is easy to spot here, but can be harder to detect in more complex code: class Foo : public IFoo { const Bar& bar_; public: Foo(const Bar& bar) : bar_(bar) { } void test() { // access bar_ here } }; int baz() { IFoo* foo = NULL; if(whatever) { Bar bar; foo = new Fo...

Deciphering the Google Search API: how to refer to an argument passed into callback function?

I'm using the Google Search API to load some Search results into my page. I'd like to set an argument to the callback function that says which div the search results should attach themselves to. Here's the callback function definition, per Google: .setSearchCompleteCallback(object, method, opt_arguments?) Here's how I'm doing it: se...

APIs for magtek magnetic credit card readers

All, I need to develop a kiosk application which needs to communicate with a magtek magnetic credit card reader. I know the readers come with drivers, but any one know of "high-level" APIs? For example, in C++, C#, JAVA? ...

.NET API for Connecting to Bugzilla

I am looking for a library to connect to Bugzilla which works with C#. I did find the Bugzilla C# Proxy, but it's not quite what I'm looking for. I haven't been able to find anything else through Google searches. Does anybody have any other suggestions? Thanks. ...

Is it possible to retrieve Facebook status using jQuery?

I'm trying to make an API call to Facebook to retrieve my status and display it on my website. ...

Is there a REST service test client/app somewhere?

Does anyone know of a web app published on the web for anyone to use to test a REST service and see the results? Must include authentication probing, caching etc. I am trying to build an app on the iPhone using the Freeagent API but I'm not convinced the service is enabled properly. Want to make sure it's not my code. ...

Is there an API for Wireshark, to develop programs/plugins that interact with it/enhance it?

Googling didn't give me great results. Is there any sort of API for Wireshark that abstracts away from the main source code so we can develop programs that interact with it and deal with the data it provides? edit: I appreciate the suggestions for different ways to receive packets, but I want to implement packet injection into Wiresha...

best way of knowing a frameworks api?

what is the best way of getting acquainted with a frameworks api in a quick way? is it by reading everything class and its members from top to bottom? ...

caching remote json (or xml) calls (from webservices)

Any clues on how to do it ? ...

Mac Printing : programatically can not set printQuality, mediaType, paperSource, outputBin

I have a Mac application that supports customising field values programatically for Print dialog. However, I could not find any API in Mac (Cocoa/Carbon) to set the values for printQuality (Best/Normal/Low/Draft), mediaType(Standard/Glossy/Transparent), paperSource or PaperFeed(Auto/Manual/Casette/Env) and outputBin(Auto/Bin1/Bin2). Thou...

Social Data API

I'm wanting to build an app that lets you input your name/date of birth/location, and searches the web for public data of others who have something in common with you. The idea is to then create an infographic with this data, i.e. Average Age of John Smith: 48 Any suggestions as to what api's/techniques I could use to do this? ...

Is there an API or library for converting DWG to any standard image format?

I am building a back-end management application for an architect company, and they work with DWG files. I am looking for a library that can convert DWG into any image format, preferably in PHP, but I am open to finding a work around in another language and connecting to what I've built so far. ...

Undocumented UPS API question

At work, I'm working on including UPS integration for our product's shopping cart. I'm currently using the documented API, which supplies WSDLs. To use this API, you need a username, password and API key (our customers who use the cart for their business will have to provide this information). There is another (undocumented) API for cal...

Python: How do you call a method when you only have the string name of the method?

This is for use in a JSON API. I don't want to have: if method_str == 'method_1': method_1() if method_str == 'method_2': method_2() For obvious reasons this is not optimal. How would I use map strings to methods like this in a reusable way (also note that I need to pass in arguments to the called functions). Here is an exam...

Scraping YouTube XML to embed via SimpleXML—where am I going wrong?

I'm trying to use this query to find the precise videos I want via XML, then I'm looking to parse the values with SimpleXML and insert them in the DOM via this method. I was experiencing a strange problem earlier when pulling the value from: <media:player url='http://www.youtube.com/watch?v=ikACkCpJ-js&amp;amp;feature=youtube_gdata'/&...

Why isn't the Flickr API RESTful?

I'm about to start developing a REST API for a client's website and I've been doing some research. I came accross this useful SO question on the gold standard for APIs: http://stackoverflow.com/questions/297005 Prior to reading this post I'd thought about using the Flickr API as a point of reference. However this comment on the above qu...

How to delete an DeliveryURL with the EBay SOAP Interface?

My application uses the EBay-API (SOAP). I understood I can use the "SetNotificationPreferences" to create up to ten DeliveryURLs like this: <?xml version="1.0" encoding="utf-8"?> <SetNotificationPreferencesRequest xmlns="urn:ebay:apis:eBLBaseComponents"> <RequesterCredentials> <eBayAuthToken>ABC...123</eBayAuthToken> </Requeste...

LogMeIn API - getSession?

The LogMeIn API's "getSession" call is driving me a bit crazy. According to their documentation, you should be able to input an iNodeID either from the getHierarchy call or just the tech's ID# from the LogMeIn admin page and it will report their open session information, but no matter what I use, I get an error "stdClass Object ( [getSes...

How do I syncronise API responses in JavaScript?

Hi there, In JavaScript, have a need to retreive data from two API calls and use both to process data for the display. For example; one call returns tasks with a user id, the other returns a list of user id's and names. Before I display onscreen I want to process the user ids so that the user name is shown against the task data. (The ...

What separates a "private language WTF" from merely bad library/API/DSL design?

Some of the most entertaining Daily WTF stories feature private languages run amok. However, domain-specific languages can be quite powerful and seem to be increasingly popular. And of course we can't program at all without good libraries, but as the adage goes, "library design is language design". Nobody likes a bad API, but is the dif...