This page contains code snippets for various frequently used programming languages. All examples are provided as is. They do not try to highlight all the possible features of the API but are intended to help someone get started quickly.
If your favorite language is not listed, please feel free to send us an example and we will integrate it into this page.
In most situations, one should use the non-multipart requests/responses. You may want to use multiparts when working with large documents. The examples are shown with both the request and the response being single or multiparts. In practice you could also use a single part request with multipart response or vice-versa.
All examples below use POST signed requests. This avoids transmitting your secret key.
Samples for all Idilia services are available in a github repository. To get the source code, run the following from the command line:
git clone https://github.com/Idilia/idilia-api-samples
- Multipart request and response: disambiguate_mpxml.cc
(Builds on Linux with g++ and requires the packages “libxml2-devel, mhash-devel, curl-devel”. More information can be found at the top of the file.)
- Single part request and response: disambiguate_xml.py
- Multipart request and response: disambiguate_mpxml.py
- Single part request and response: disambiguate_xml.rb
- Multipart request and response: disambiguate_mpxml.rb
- Disambiguate multiple documents simultaneously: disambiguate_multiple_mpxml.rb
- text/tag.json example: tag_json.rb
- Single part request and response: Disambiguate.java