How to use Java API? - eclipse

I've been given an online API (just a website that hosts multiple functions and an API to use them. How do I use it? There's no jar file to implement or any other help. All I have is the site with the usable functions (e.g. typing in a countryname and getting back the countrycode) and the API documentation.
I want to be able to use those functions in eclipse. If I've understood correctly I need a jar file to import in eclipse? I'm unable to find a jar file on that website, even though it states that it's a free and easy to use API.

Please provide the link of the online API.
Statement is bit confusing. Are you looking at the API doc or actual API.
If the API is Online it should be REST Service Or the SOAP. If it is API doc then you need to download the libraries of the API and then need to use it.

Related

How to call ResolveCustomer and GetEntitlements from aws-marketplace using aws-sdk-go?

I need to call ResolveCustomer and GetEntitlements services using aws-sdk-go. There is no code samples available on how to configure the aws clients for such calls.
Can someone help with the go code examples?
It will be helpful if someone has done unit testing for such calls; in terms of how to mock the ResolveCustomer and GetEntitlements API calls in golang?
The MarketPlaceMetering package's New function, https://docs.aws.amazon.com/sdk-for-go/api/service/marketplacemetering/#New, has a short example of creating a MarketPlaceMetering client.
GetEntitlements is part of the MarketplaceEntitlementService package, so see that package's New function, https://docs.aws.amazon.com/sdk-for-go/api/service/marketplaceentitlementservice/#New, for a short example of creating a MarketPlaceEntitlementService client.
For more info on configuring the SDK, see https://docs.aws.amazon.com/sdk-for-go/v1/developer-guide/making-requests.html.
Note that these are both in the V1 version of the Go SDK. Feel free to browse the V2 version, https://github.com/aws/aws-sdk-go-v2, which has some differences in how you create a client (you should be able to figure it out from the DynamoDB example there).

Using Amazon's affiliate API for autocompletion

On a website I'm building a search for Amazon products. This should display some information on the products I can pick up using their affiliate API. I can look up information on the products using this dependency (which I'm not entirely happy about, because I should probably create my own package from their provided WSDL), but I'm not entirely sure what would be the best way to implement an autocomplete in a searchbox for their products.
I want to load the autocomplete information from my own server rather than one of Amazon's, but I am not certain what the recommended way to do this would be. Through the provided Amazon affiliate API or is there a better way?
As a summary, I am looking for a way where I have a textbox with autocompletion on my website, that uses my own server to do the autocompletion (example.com/search/autocomplete/%QUERY%), which should then call some autocompletion functionality on the Amazon API.
Amazon offers -next to their affiliate API- a webservice which can be used to get their autocomplete information. It can be utilized by calling an URL in the style of:
http://completion.amazon.com/search/complete?search-alias=aps&client=amazon-search-ui&mkt=1&q=canon
Where the contents of q is the query that you want autocompleted.
I created a vanilla JavaScript plugin to integrate the Amazon Autocomplete webservice into a search input.
Fortunately, the Amazon webservice is JSONP enabled so it let you handle the requests via <script> tags and callbacks, which is already implemented in the plugin.
https://github.com/caroso1222/amazon-autocomplete

Document versioning with MarkLogic REST API

We're currently using MarkLogic's dls functions to handle document versioning, and are trying to switch over to use the REST API. The document endpoint doesn't use versioning by default, and I can't figure out a way to get it to. I'm referring to the dls functions for keeping multiple document versions, btw, not the new "content versioning" the REST API documentation mentions. In fact, the only reference to document versions in the REST API docs seems to be a line saying that content versioning isn't the same thing.
The only solution we've been able to come up with is to write a custom endpoint that duplicates everything the existing document endpoint's PUT does, plus document management. I'd rather avoid that if possible, especially when looking at MarkLogic 7's partial document updates. We're using MarkLogic 6 now, if it matters, but it doesn't look like 7 has any new features related to this.
Is there a way to do this using MarkLogic's existing endpoints?
You can write a REST API extension that automates the DLS operations. See http://docs.marklogic.com/guide/rest-dev/extensions. You will largely end up duplicating a lot of the same things, but this will plug into the existing endpoints.
Yes, MarkLogic 7 added content versioning to make refreshing of caches easier. And unfortunately, the DLS library hasn't been integrated into the REST api so far. You can file a feature request at support if you like.
In the mean time, the best suggestion I can give is use a separate route to do document updates using DLS (your current route or a limited custom endpoint that only supports the DLS functions you need for doc updates), and do anything else (as far as possible) using the existing REST api. You can look at this other stackoverflow question to see how to limit searches to the latest doc versions:
Marklogic REST API search for latest document version
HTH!
A member of MarkLogic has put together a REST extension to provide better DLS support in the REST-api. Hopefully that makes working with DLS over the MarkLogic REST-api a lot easier:
https://github.com/sanjuthomas/marklogic-dls-rest-extension
HTH!

IBM SmartCloud Control Desk REST API

I'm trying to write a program to access the SCCD REST API, but can't find any documentation online. I'd like to know the URLs I have to call. So for example to access a persons details I call :
/maxrest/rest/os/person
But I can't find any other URIs or any documentation of that API. The only thing I found, doesn't mention the URLs. I want something like this just for SCCD.
I know it's been a loooong time and it's probably not relevant for this person, but I did find a better answer than "no".
Here's the link:
http://www-01.ibm.com/support/knowledgecenter/SSWT9A_7.5.3/com.ibm.mif.doc/gp_intfrmwk/rest_api/c_rest_overview.html
After talking to the IBM Support, it seems there is indeed no documentation available.

GData Google API Objective-C client help for iPhone

There seems to be no available documentation for the Objective-C client for the Google Data API. Google's API help webpage only has options for .NET, Java, Python, and the HTTP Protocol. I want to access data from a spreadsheet on my Google Docs account, and then add new data.
I have added the correct source codes to my project as outlined in the GData Wiki, and am now completely lost. There are a ton of classes to sort through for Spreadsheets, and there are very few comments and I can't really tell by method names what does what.
If possible, can someone post a couple snippets of code to first access the available documents, then pick one of the choices, and then add information to a cell (like A1)?
Thank you in advance for your consideration!
Did you look at the spreadsheet sample?
http://code.google.com/p/gdata-objectivec-client/wiki/GDataObjCIntroduction
A year or so later, a page for just this: Google Data APIs Objective-C Client Library
Generally, to create a new entry, you'll use an http POST to the feed's postLink. The Obj-C library service class provides POST operations as the method fetchEntryByInsertingEntry:
I believe creating a new spreadsheet still requires uploading a new document, as mentioned in the docs. You could create a simple CSV text file and upload that as a spreadsheet.
Note that there is a discussion group for users of the library.