api

Marker in Google Maps

My map(V3) is loaded into an iframe. I need to find the pixel co ordinates of each marker relative to the iframe. Could someone tell me how to do that please? Thanks a ton. ...

Decoding Java's JSON Unicode values with PHP

I had experienced different JSON encoded value for the same string depending on the language used in the past. Since the APIs were used in closed environment (no 3rd parties allowed), we made a compromise and all our Java applications are manually encoding Unicode characters. LinkedIn's API is returning "corrupted" values, basically the ...

Rails nested resources: Input vs. output format inconsistency

Given the following two models: class Company < ActiveRecord::Base has_many :departments accepts_nested_attributes_for :departments end class Department < ActiveRecord::Base belongs_to :company end I can now create a company and its departments in one go: @company = Company.create! params[:company] In this example params[:co...

Magento with external datasource

I'm a .Net developer, I focus mainly on the system logic rather than UI stuff, and I actually know zero about PHP so please excuse any ignorance! We are looking at using a marketing/SEO/design agency to aid us in launching a website, and they use Magento. However we have a completely bespoke order fulfilment system, which already exists...

implementing an API system to an Uploading system

Hi, I have a upload system , where one can upload images, I want to implement an simple API system, where they can make a POST request, and get the result in simple xml. I currently handle the upload via a php script which has a form, where users can browse and upload the file,the script then redirects to a page where they can get the...

How to get CUSIP-Description data using Bloomberg API?

I had a look at Asynchronous data through Bloomberg's new data API (COM v3) with Python? before posting which has some pretty awesome info, but what I need is a way to create a CUSIP-Description table in a database using the Bloomberg API (to save $$$ by avoiding a CUSIP subscription) Does anyone know how to populate a table with CUSIP ...

Is it a convention to avoid using $_ when using other people's Perl API's?

I've just been caught out when using someone else's API in conjunction with the default variable $_ foreach (@rps_server_details) { @server_data = (); @server_data = split(/,/); @$esp_hosts = (); $filters{server_name} = $server_data[0]; print "--->$_<--\n"; $esp_hosts = $esp->get_hosts(fields => $fields, %filters...

Facebook Graph API PHP SDK posting on page as page

Hi there. It's final try with PHP, if it fails, I'll try with JS. So my goal is to post on FB page as "Page name" through PHP: this is what I want to get But all I get is shown pic below. Also, it's visible ONLY to this profile (not to friends/ppl who like/etc.). This is my current code function post_facebook($data=null, $redir =...

Is there any web api for Apple's Game Center?

I have a website. I was wondering if Apple exposed its Game Center data via a web api. If would be cool if I could show users their Game Center info right in my website! Let me know folks. ...

Equivlent Objective-C code for Google Maps GMap2.getBoundsZoomLevel(bounds)?

Hi all, I'm familiar with the Google Maps API and I'm trying to learned the iOS MapKit library now. I have an iPhone application which takes an input string and geocodes it using Google Maps geocoder service. I also want to set an appropriate zoom level for the new map but I'm not quite sure how to do it. After reading, http://stacko...

String error in my python api wrapper class

I'm writing an API wrapper to a couple of different web services. I have a method that has an article url, and I want to extract text from it using alchemyapi. def extractText(self): #All Extract Text Methods ---------------------------------------------------------// #Extract page text from a web URL (ignoring navigation links...

Available Music API

I am wanting to develop a workout app that will involve certain types of music and I figured the easiest way to get certain genres is to see if a music app allows developers to use their API. If so I would go from there, but first I need to find someone. Does anyone know of a Music App (Pandora, Slacker...) that will allow developers t...

how to transfer big files using webservice api in wordpress or php

how to transfer big files using webservice api in wordpress or php? Thanks in advance Naveen ...

How to remove %EF%BB%BF in PHP string

I am trying to use MS Bing API $data = file_get_contents("http://api.microsofttranslator.com/V2/Ajax.svc/Speak?appId=APPID&amp;text={$text}&amp;language=ja&amp;format=audio/wav"); $data = stripslashes(trim($data)); The data returned has a ' ' character in the first character of the returned string. It is not a space because I trimed ...

Paypal API and Paypal's Sample Code?

https://www.x.com/community/ppx/code_samples The sample code returns ACK, but where is the proper response? For example Getbalance, sample code returns ACK https://cms.paypal.com/cms_content/US/en_US/files/developer/nvp_GetBalance_cs.txt but the document shows it returns other values? https://www.x.com/docs/DOC-1186 ...

Do REST API URLs have to look like this?

Is it true that to implement a RESTful API, one has to implement a URL structure that looks like this http://example.com/post/ http://example.com/post/123 where the /123 would be used for edit, delete Another way to ask the question is: can a URL that looks like this be called RESTful? http://example.com/script.php?method=get_title&...

Direct Upload Zend PHP: How do I disable comments on videos being uploaded?

Here's a sample of my code: $httpClient = Zend_Gdata_ClientLogin::getHttpClient( $username, $password, $service, $client, $source, $loginToken, $loginCaptcha, $authenticationURL); $httpClient->setHeaders('X-GData-Key', "key=${myDeveloperKey}"); $yt = new Zend_Gdata_YouTube($httpClient); $myVideoEntry = new Zend_Gdata_YouTube_VideoEntr...

What should be the reponse code when validation errors happen?

Hey, I'm implementing an API. The API accepts/returns JSON content type. Now, suppose that the data submitted by some POST request is not valid, like a missing attribute, or a duplication exists for the same data. What is the standard HTML response code in that case? ...

Webservice to create account, country state list?

I have a webservice that a developer can use to create a user account, apart of the create user account form, it requires an input of the user's "Postal Address" The Postal address has "Country State Id" Normally, I would provide a list for everything else, but when it comes to country state list it contains thousands and thousands of ...

Using google search API services in the backend using C#

I'm trying to use the google search API services in the backend using C#. I know there is ajax api that you can use with javascript. so what is the similar thing in C# so I can use it at the backend level. I know that I can do it this way: var searchTerm = "Paris"; var web = new WebClient(); web.Headers.Add("Referrer", "http://localho...