🚀 Big News:Socket Has Acquired Secure Annex.Learn More
Socket
Book a DemoSign in
Socket

next-ft-api-client

Package Overview
Dependencies
Maintainers
2
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

next-ft-api-client

No caching, no models, no complexity, none of that or any of that.

latest
npmnpm
Version
3.26.0
Version published
Weekly downloads
122
67.12%
Maintainers
2
Weekly downloads
 
Created
Source

next-ft-api-client

No caching, no models, no complexity, none of that or any of that.

npm install --save next-ft-api-client
var api = require('next-ft-api-client');

.content(opts)

  • uuid - uuid (or array of uuids) of wanted content

If uuid is a string return a Promise that resolves with V3 Elasticsearch content, if uuid is an array, returns a Promise that resolves with an array of content.

.contentAnnotatedBy(opts)

  • uuid - uuid of thing wanted to select content by
  • count - number of items of content to return (default 10)

Returns with a Promise that resolves with an array of V2 content objects.

.lists(opts)

  • uuid - uuid of wanted list

Returns with a Promise that resolves with a list.

.organisations(opts)

  • uuid - uuid of wanted organisation

Returns with a Promise that resolves with an organisation.

.people(opts)

  • uuid - uuid of wanted person

Returns with a Promise that resolves with a person.

.search(opts)

  • filter - search filter. Either an array of [ fieldname, value ] or an Elasticsearch filter object.
  • fields - an array of source document fields to fetch
  • count - number of documents to return (default 10)
  • offset - number of documents to offset by (default 0)

Returns a promise that resolves an array of documents from the V3 Elasticsearch index.

.things(opts)

  • identifierValues - an array of source thing ids you wish to fetch
  • identifierType - property type of indetifier you wish to search on, such as prefLabel or idV1 (default 'idV1')
  • authority - the authority the terms belong too (defaults to FT-TME: http://api.ft.com/system/FT-TME)

Returns with a Promise that resolves with an array of things.

.mapping(uuid, taxonomy)

  • uuid - uuid of thing to map
  • taxonomy - taxonomy of thing to map

Returns with a Promise that resolves with the mapped concept.

.hui(opts)

  • model - string of the type of model you want returned (default 'content')
  • industry - uuid of an industry
  • position - uuid of a position
  • sector - uuid of a sector
  • country - uuid of a country
  • period - time period to use e.g last-1-day, last-1-week (default last-1-day)
  • count - number of UUIDs to return (default 10)

Returns with a Promise that resolves with a list.

.concordance(opts)

  • id - string of the id either TME (v1) or uuid (v2)

If it is passed a uuid it will concord to the v1 TME. If the id is not a uuid it will concord to the V2 uuid.

FAQs

Package last updated on 08 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts