{"_id":"3taps","_rev":"14-08169bfa35faec34ed3b19ad540c94f0","name":"3taps","description":"Node client for 3taps API","dist-tags":{"latest":"0.1.6"},"versions":{"0.1.1":{"name":"3taps","version":"0.1.1","description":"Node client for 3taps API","main":"./lib","scripts":{"test":"gulp jshint && gulp test-coverage"},"repository":{"type":"git","url":"git@github.com:brozeph/3taps.git"},"keywords":["3taps"],"author":{"name":"@brozeph"},"license":"MIT","devDependencies":{"chai":"^1.10.0","del":"^1.0.0","gulp":"^3.8.10","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.9.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","nock":"^0.51.0","run-sequence":"^1.0.2"},"dependencies":{"request":"^2.49.0"},"gitHead":"82204b6fc5d118120847576e0e56e42dd61ffab8","bugs":{"url":"https://github.com/brozeph/3taps/issues"},"homepage":"https://github.com/brozeph/3taps","_id":"3taps@0.1.1","_shasum":"2d60291560884ce4709f1be1a18ed13282f577c6","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"brozeph","email":"joshua.thomas@gmail.com"},"maintainers":[{"name":"brozeph","email":"joshua.thomas@gmail.com"}],"dist":{"shasum":"2d60291560884ce4709f1be1a18ed13282f577c6","tarball":"https://registry.npmjs.org/3taps/-/3taps-0.1.1.tgz","integrity":"sha512-wEU5aKvOK22k1fMhDJN+cvtWcXPqgWvlbJj+TDAgT5yp8bDqVPW0W95APHC+hOJk7cTQtshTA5rILISz6XDJMw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFFsKy+Y9bVzXsxGpcbp/FE101rFALxNF4f074gxjsgSAiEA0nzOqH241LJHaADQMM+3hRUmDRlg4eb7JyZnQUoHAJw="}]}},"0.1.2":{"name":"3taps","version":"0.1.2","description":"Node client for 3taps API","main":"./lib","scripts":{"test":"gulp jshint && gulp test-coverage && gulp coveralls"},"repository":{"type":"git","url":"git@github.com:brozeph/3taps.git"},"keywords":["3taps"],"author":{"name":"@brozeph"},"license":"MIT","devDependencies":{"chai":"^1.10.0","del":"^1.0.0","gulp":"^3.8.10","gulp-coveralls":"^0.1.3","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.9.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","nock":"^0.51.0","run-sequence":"^1.0.2"},"dependencies":{"request":"^2.49.0"},"gitHead":"1c71afbb510f7041f0a6ec9bac0216f3ac67d4b5","bugs":{"url":"https://github.com/brozeph/3taps/issues"},"homepage":"https://github.com/brozeph/3taps","_id":"3taps@0.1.2","_shasum":"af2a046757d8ab08c66ecc1c31e8426496099afd","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"brozeph","email":"joshua.thomas@gmail.com"},"maintainers":[{"name":"brozeph","email":"joshua.thomas@gmail.com"}],"dist":{"shasum":"af2a046757d8ab08c66ecc1c31e8426496099afd","tarball":"https://registry.npmjs.org/3taps/-/3taps-0.1.2.tgz","integrity":"sha512-0KsGFLOj8/LzwNOoGsRrYZlyA0076n6aifnA2Uv7xAUCHodIBh+vfMd9lyDXfPxLSEf0Tbx1mO+wWtTeOTaUqg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDjxwQwqktfYWoK0hU1cPPHTUmdYlHGYQIwZQ2KOZzfYwIgFrEaSpAQ/v/KolRCoMxK1wt2R42UERor3gLUSnv4GY4="}]}},"0.1.3":{"name":"3taps","version":"0.1.3","description":"Node client for 3taps API","main":"./lib","scripts":{"test":"gulp jshint && gulp test-coverage && gulp coveralls"},"repository":{"type":"git","url":"git@github.com:brozeph/3taps.git"},"keywords":["3taps"],"author":{"name":"@brozeph"},"license":"MIT","devDependencies":{"chai":"^1.10.0","del":"^1.0.0","gulp":"^3.8.10","gulp-coveralls":"^0.1.3","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.9.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","nock":"^0.51.0","run-sequence":"^1.0.2"},"dependencies":{"request":"^2.49.0"},"gitHead":"687c34822e0f8025ca79ce8df8fd3bc03abfa263","bugs":{"url":"https://github.com/brozeph/3taps/issues"},"homepage":"https://github.com/brozeph/3taps","_id":"3taps@0.1.3","_shasum":"b349cc86b825d40ddd16e3d4ac3de8590a80f75a","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"brozeph","email":"joshua.thomas@gmail.com"},"maintainers":[{"name":"brozeph","email":"joshua.thomas@gmail.com"}],"dist":{"shasum":"b349cc86b825d40ddd16e3d4ac3de8590a80f75a","tarball":"https://registry.npmjs.org/3taps/-/3taps-0.1.3.tgz","integrity":"sha512-XV9oQUvmvBrbA8MHxF521NteMIsFgWhp2aoEJC5Px/9zEIR+2Y4bhuq71yFpdG7ZFQwEEjX93J/wCd9AOuNYKQ==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCefHFmo9Ya4mipm4Nr2Gy2fODEf+Z2gwU55/KRzusIlwIhAIyzXi1o6QwGwwlwP2OF5TE7sPmCNu0DzfnbHAyW99rG"}]}},"0.1.4":{"name":"3taps","version":"0.1.4","description":"Node client for 3taps API","main":"./lib","scripts":{"test":"gulp jshint && gulp test-coverage && gulp coveralls"},"repository":{"type":"git","url":"git@github.com:brozeph/3taps.git"},"keywords":["3taps"],"author":{"name":"@brozeph"},"license":"MIT","devDependencies":{"chai":"^1.10.0","del":"^1.1.0","gulp":"^3.8.10","gulp-coveralls":"^0.1.3","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.9.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","nock":"^0.51.0","run-sequence":"^1.0.2"},"dependencies":{"request":"^2.49.0"},"gitHead":"b4e285588bbdac8c7c1173e8e0ae531121437d43","bugs":{"url":"https://github.com/brozeph/3taps/issues"},"homepage":"https://github.com/brozeph/3taps","_id":"3taps@0.1.4","_shasum":"36cccf415f4783b5186be9dc80caaec1af1bf81c","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"brozeph","email":"joshua.thomas@gmail.com"},"maintainers":[{"name":"brozeph","email":"joshua.thomas@gmail.com"}],"dist":{"shasum":"36cccf415f4783b5186be9dc80caaec1af1bf81c","tarball":"https://registry.npmjs.org/3taps/-/3taps-0.1.4.tgz","integrity":"sha512-knZQnJ/q1ArHqwyYF1hJGJi1s2ZacMCC41z9IuHC+Rp4DYzDGkuNlIwV3Z2Gzv6dZGH0RvMCVjkX+MbgrhYL9A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEm0uXN/xWudX5fcgvOqzcBCpwaM5Xgei5c1SjlNTrOIAiEA6f70jQTFqxRrEB9x+vbfwZsDYVyxZdahOH5rLVXF/bo="}]}},"0.1.5":{"name":"3taps","version":"0.1.5","description":"Node client for 3taps API","main":"./lib","scripts":{"test":"gulp jshint && gulp test-coverage && gulp coveralls"},"repository":{"type":"git","url":"git@github.com:brozeph/3taps.git"},"keywords":["3taps"],"author":{"name":"@brozeph"},"license":"MIT","devDependencies":{"chai":"^1.10.0","del":"^1.1.0","gulp":"^3.8.10","gulp-coveralls":"^0.1.3","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.9.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","nock":"^0.51.0","run-sequence":"^1.0.2"},"dependencies":{"request":"^2.49.0"},"gitHead":"925584db0843f937806433ed249e139493da6863","bugs":{"url":"https://github.com/brozeph/3taps/issues"},"homepage":"https://github.com/brozeph/3taps","_id":"3taps@0.1.5","_shasum":"d702dbde1eea3de2e528c5bc3d634dc2d3af0097","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"brozeph","email":"joshua.thomas@gmail.com"},"maintainers":[{"name":"brozeph","email":"joshua.thomas@gmail.com"}],"dist":{"shasum":"d702dbde1eea3de2e528c5bc3d634dc2d3af0097","tarball":"https://registry.npmjs.org/3taps/-/3taps-0.1.5.tgz","integrity":"sha512-8xekuVLN33UIrC8a03kEmNiz5OOKD/WMtdvk5v9tYFEylMH3h2sCzrblxIOJN/vV3RsyO3erky6L/y3muDrEhw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHsovi3nLB3AKzT+ucHH/CfUzFVCE432RJS9bbGwNiKtAiEA+9Jl4vMAA39hckA46plIHhsoln8X12WPVThx3wtQBSg="}]}},"0.1.6":{"name":"3taps","version":"0.1.6","description":"Node client for 3taps API","main":"./lib","scripts":{"test":"gulp jshint && gulp test-coverage && gulp coveralls"},"repository":{"type":"git","url":"git@github.com:brozeph/3taps.git"},"keywords":["3taps"],"author":{"name":"@brozeph"},"license":"MIT","devDependencies":{"chai":"^1.10.0","del":"^1.1.0","gulp":"^3.8.10","gulp-coveralls":"^0.1.3","gulp-istanbul":"^0.5.0","gulp-jshint":"^1.9.0","gulp-mocha":"^2.0.0","jshint-stylish":"^1.0.0","nock":"^0.51.0","run-sequence":"^1.0.2"},"dependencies":{"request":"^2.49.0"},"gitHead":"3f0b4087575fa48906d7d08883c44829ef47f6fb","bugs":{"url":"https://github.com/brozeph/3taps/issues"},"homepage":"https://github.com/brozeph/3taps","_id":"3taps@0.1.6","_shasum":"63af9e2250f3b9aa0cd6fecbeedbc5fd60dfec43","_from":".","_npmVersion":"2.1.6","_nodeVersion":"0.10.33","_npmUser":{"name":"brozeph","email":"joshua.thomas@gmail.com"},"maintainers":[{"name":"brozeph","email":"joshua.thomas@gmail.com"}],"dist":{"shasum":"63af9e2250f3b9aa0cd6fecbeedbc5fd60dfec43","tarball":"https://registry.npmjs.org/3taps/-/3taps-0.1.6.tgz","integrity":"sha512-2FqIpOTR7tOoIRLYpb7NALMv0eeEPsVQjyXiHZ5dWhYZkpt0NC1Q2CXl+vP9dm1BerJmBgkjfhMu6FDaqBeqww==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEH25uY1uTxvwhXmIOXp1q6HCDAs5dKPpsDUQUZvxx2hAiEAtDfWmAug5wBEN3Fl5z+deVZZ11QdjpcFDI78zVKYU/8="}]}}},"readme":"# 3taps API Node Client\n\n[![Build Status](https://travis-ci.org/brozeph/3taps.svg)](https://travis-ci.org/brozeph/3taps) [![Coverage Status](https://img.shields.io/coveralls/brozeph/3taps.svg)](https://coveralls.io/r/brozeph/3taps?branch=master)\n\nThis is an API client for the 3taps polling, reference and search API endpoints.\n\n## Getting Started\n\n```bash\nnpm install 3taps\n```\n\n### General Reference\n\n#### Errors\n\nIn the event that the 3taps API returns an unsupported HTTP status code (i.e. less than 200 or greater than 299) *or* when the `success` field from the return message is `false`, the callback will contain an error with the following properties:\n\n```javascript\n{\n  requestOptions: {\n    method: 'GET',\n    qs: { auth_token: 'test-api-key', timestamp: 1417789575187 },\n    url: 'https://polling.3taps.com/anchor'\n  },\n  response: {\n    success: false,\n    error: 'example error',\n    request: {\n      body: '',\n      uri: '/anchor?auth_token=test-api-key&timestamp=1417789575187'\n    }\n  },\n  statusCode: 409\n}\n```\n\n#### Options\n\nOptions are optional for every method call... the underlying 3taps API may return an error in the event that an expected parameter is missing, however. All parameters can be specified globally when initializing the client library and each initialized parameter value can be overridden in each module method call.\n\n##### Base Constructor Options\n\nThe following options are required when creating the client library:\n\n* `apikey` : the API key for access to the 3taps API\n\nThe following options are optional when creating the client library:\n\n* `maxRetryCount` : _defaults to 0_ - the number of retries in the event that any error is returned when calling the API\n* `pollingUrl` : _defaults to_ https://polling.3taps.com\n* `referenceUrl` : _defaults to_ https://reference.3taps.com\n* `searchUrl` : _defaults to_ https://search.3taps.com\n* `strictSSL` : _defaults to true_\n* `timeout` : _defaults to 10000 (10 seconds)_\n\n\n### Polling API\n\nThe polling endpoint supports two specific capabilities: `anchor` and `poll`\n\n#### Anchor\n\nUse this to generate an anchor from a point in time... the timestamp value is supported as a Date value or the number of seconds from Unix epoch (January 1, 1970).\n\n```javascript\nvar\n  anchorDate = new Date(),\n  threeTapsClient = require('3taps')({ apikey : 'my-api-key' });\n\n// retrieve all postings new in the last hour\nanchorDate.setHours(anchorDate.getHours() - 1);\n\nthreeTapsClient.anchor({\n  timestamp : anchorDate\n}, function (err, data) {\n  // work with data here\n});\n```\n\nFor which the response will look similar to the following:\n\n```javascript\n{\n  success: true,\n  anchor: 1570197959\n}\n```\n\n#### Poll\n\n```javascript\nvar threeTapsClient = require('3taps')({ apikey : 'my-api-key' });\n\nthreeTapsClient.poll({\n  anchor : 1570197959\n}, function (err, data) {\n  // work with data here\n});\n```\n\nThe library will respond with something similar to:\n\n```javascript\n{\n  success: true,\n  anchor: 124981255,\n  postings: [\n  { id: 1570150577,\n    source: 'CRAIG',\n    category: 'RHFS',\n    external_id: '4757959490',\n    external_url: 'http://greensboro.craigslist.org/reb/4757959490.html',\n    heading: '6312 Settlement Road',\n    timestamp: 1417712270,\n    annotations: [Object],\n    deleted: false,\n    location: [Object] },\n  { id: 1570150578,\n    source: 'CRAIG',\n    category: 'JMFT',\n    external_id: '4759338172',\n    external_url: 'http://fredericksburg.craigslist.org/mnu/4759338172.html',\n    heading: 'QA Technician',\n    timestamp: 1417711983,\n    annotations: [Object],\n    deleted: false,\n    location: [Object] },\n  // and so on...\n  ]\n}\n```\n\n##### Polling Options\n\nPolling supports a series of parameters that can be passed in the `options` argument. For a full reference, please see the 3taps documentaiton at <http://docs.3taps.com/polling_api.html>. Additionally, many of the params support the ability to pass in the logical operators `|` (or) and `-` (not).\n\nHere is an example list of options:\n\n```javascript\nvar options = {\n  anchor : 12345, // optional\n  category : '', // optional - 3taps category code, supports logical operators\n  'category_group' : '', // optional - 3taps category_group code, supports logical operators\n  'location' : {\n    'city' : '', // optional - desired City, supports logical operators\n    'country' : '', // optional - desired Country code, supports logical operators\n    'county' : '', // optional - desired County code, supports logical operators\n    'locality' : '', // optional - 3taps Locality code, supports logical operators\n    'metro' : '', // optional - 3taps Metro Area code, supports logical operators\n    'region' : '', // optional - 3taps Region code, supports logical operators\n    'state' : '', // optional - 3taps City code, supports logical operators\n    'zipcode' : '' // optional - desired Zip Code, supports logical operators\n  },\n  retvals : [''], // optional - list of fields to return (see below)\n  source : '', // optional - 3taps Data Source code, supports logical operators\n  state : '', // optional - state of the posting (see below), supports logical operators\n  status : '' // optional - status of the posting (see below), supports logical operators\n};\n\nthreeTapsClient.poll(options, function (err, data) {\n  // filtered awesomeness in the data arg\n});\n```\n\n###### retvals\n\nThe retvals parameter supports an array or a comma separated list of values from the following:\n\n* id\n* account_id\n* source\n* category\n* category_group\n* location\n* external_id\n* external_url\n* heading\n* body\n* timestamp\n* timestamp_deleted\n* expires\n* language\n* price\n* currency\n* images\n* annotations\n* status\n* state\n* immortal\n* deleted\n* flagged_status\n\n###### state\n\nThe state parameter supports the following values:\n\n* available\n* unavailable\n* expired\n\n###### status\n\nThe status parameter supports the following values:\n\n* registered\n* for_sale\n* for_hire\n* for_rent\n* wanted\n* lost\n* stolen\n* found\n\n### Reference API\n\nThe reference API endpoint in 3taps returns information about `categories`, `category_groups`, `sources` and `locations` in addition to providing the ability to lookup a specific location to retrieve detailed information.\n\n_*Important Note:*_\n\nPeriodically, the values from reference API methods will change... they can be cached, but periodically, the lastModified date should be used to determine if a value has been updated. The responses from `#getCategories`, `#getCategoryGroups`, `#getDataSources` and `#getLocations` will contain a `lastModified` field that can be used for this purpose.\n\n#### getCategories\n\n```javascript\nvar threeTapsClient = require('3taps')({ apikey : 'my-api-key' });\n\nthreeTapsClient.getCategories(function (err, data) {\n  // work with categories here\n});\n```\n\nThe response will look similar to the following:\n\n```javascript\n{\n  categories: [{\n    code: 'APET',\n    group_code: 'AAAA',\n    group_name: 'Animals',\n    name: 'Pets'\n  }, {\n    code: 'ASUP',\n    group_code: 'AAAA',\n    group_name: 'Animals',\n    name: 'Supplies'\n  }, {\n  // ... more categories, etc.\n  }],\n  success: true,\n  lastModified: 'Tue Sep 10 2013 00:34:25 GMT-0700 (PDT)'\n}\n```\n\n#### getCategoryGroups\n\n```javascript\nvar threeTapsClient = require('3taps')({ apikey : 'my-api-key' });\n\nthreeTapsClient.getCategoryGroups(function (err, data) {\n  // work with category groups here\n});\n```\n\nThe response will look similar to:\n\n```javascript\n{ category_groups:\n   [ { code: 'AAAA', name: 'Animals' },\n     { code: 'CCCC', name: 'Community' },\n     { code: 'DISP', name: 'Dispatch' },\n     { code: 'SSSS', name: 'For Sale' },\n     { code: 'JJJJ', name: 'Jobs' },\n     { code: 'MMMM', name: 'Mature' },\n     { code: 'PPPP', name: 'Personals' },\n     { code: 'RRRR', name: 'Real Estate' },\n     { code: 'SVCS', name: 'Services' },\n     { code: 'ZZZZ', name: 'Uncategorized' },\n     { code: 'VVVV', name: 'Vehicles' } ],\n  success: true,\n  lastModified: 'Mon Sep 02 2013 00:34:25 GMT-0700 (PDT)'\n}\n```\n\n#### getDataSources\n\n```javascript\nvar threeTapsClient = require('3taps')({ apikey : 'my-api-key' });\n\nthreeTapsClient.getDataSources(function (err, data) {\n  // work with data sources here\n});\n```\n\nThe response will look similar to:\n\n```javascript\n{ sources:\n   [ { code: 'APTSD', name: 'Apartments.com' },\n     { code: 'AUTOC', name: 'autotraderclassic.com' },\n     { code: 'AUTOD', name: 'autotrader.com' },\n     { code: 'BKPGE', name: 'Backpage' },\n     { code: 'CARSD', name: 'Cars.com' },\n     { code: 'CCARS', name: 'classiccars.com' },\n     { code: 'CRAIG', name: 'Craigslist' },\n     { code: 'E_BAY', name: 'ebay.com' },\n     { code: 'EBAYM', name: 'Ebay Motors' },\n     { code: 'HMNGS', name: 'Hemmings Motor News' },\n     { code: 'INDEE', name: 'Indeed' },\n     { code: 'RENTD', name: 'Rent.com' } ],\n  success: true,\n  lastModified: 'Tue Sep 30 2014 00:34:25 GMT-0700 (PDT)'\n}\n```\n\n#### getLocations\n\nThis method requires the parameter `level` which should contain one of the following string values:\n\n* city\n* country\n* county\n* locality\n* metro\n* region\n* state\n* zipcode\n\nAdditionally, the results returned can be filtered at the server by passing any of the following parameters:\n\n* city - only includes locations that exist within the specified 3taps city code\n* country - only includes locations that exist within the specified 3taps country code\n* county - only includes locations that exist within the specified 3taps county code\n* locality - only includes locations that exist within the specified 3taps locality code\n* metro - only includes locations that exist within the specified 3taps metro code\n* region - only includes locations that exist within the specified 3taps region code\n* state - only includes locations that exist within the specified 3taps state code\n\nSee the following example to pull zipcodes within San Francisco:\n\n```javascript\nvar\n  options = {\n    level : 'zipcode',\n    city : 'USA-SFO-SNF'\n  },\n  threeTapsClient = require('3taps')({ apikey : 'my-api-key' });\n\nthreeTapsClient.getLocations(\n  options,\n  function (err, data) {\n    // work with locations here\n  });\n```\n\nWhich returns data similar to the following:\n\n```javascript\n{\n  locations: [{\n    bounds_max_lat: 37.78933,\n    bounds_max_long: -122.40438,\n    bounds_min_lat: 37.76963,\n    bounds_min_long: -122.42968,\n    code: 'USA-94102',\n    full_name: '94102',\n    short_name: '94102'\n   }, {\n    bounds_max_lat: 37.78823,\n    bounds_max_long: -122.39768,\n    bounds_min_lat: 37.76453,\n    bounds_min_long: -122.42615,\n    code: 'USA-94103',\n    full_name: '94103',\n    short_name: '94103'\n  }, {\n    // more results here...\n  }],\n  success: true,\n  lastModified: 'Mon Sep 02 2013 00:34:25 GMT-0700 (PDT)'\n}\n```\n\n#### lookupLocation\n\nProvides the ability to find the details of a single location based on its code...\n\n```javascript\nvar\n  options = {\n    code : 'USA-94102'\n  },\n  threeTapsClient = require('3taps')({ apikey : 'my-api-key' });\n\nthreeTapsClient.lookupLocation(\n  options,\n  function (err, data) {\n    // work with location here\n  });\n```\n\nWhich will return data similar to the following:\n\n```javascript\n{ location:\n   { bounds_max_lat: 37.78933,\n     bounds_max_long: -122.40438,\n     bounds_min_lat: 37.76963,\n     bounds_min_long: -122.42968,\n     code: 'USA-94102',\n     full_name: '94102',\n     level: 'zipcode',\n     short_name: '94102' },\n  success: true }\n```\n\n### Search API\n\nSearch supports a series of parameters that can be passed in the `options` argument. For a full reference, please see the 3taps documentaiton at <http://docs.3taps.com/search_api.html>. Additionally, many of the params support the ability to pass in the logical operators `|` (or) and `-` (not).\n\nHere is a list of all _optional_ options:\n\n#### Reference Filters\n\n* category\n* category_group\n* location.city\n* location.country\n* location.county\n* location.locality\n* location.metro\n* location.region\n* location.state\n* location.zipcode\n* source\n\n#### Geographic Filters\n\n* lat\n* long\n* radius\n\n#### Posting Specific Filters\n\n* annotations\n* body\n* currency\n* external_id\n* has_image\n* has_price\n* heading\n* id\n* include_deleted\n* only_deleted\n* price\n* state\n* status\n* text\n* timestamp\n\n#### Response Shaping\n\n* anchor - Helps in working with the constant changing of pages\n* count - Puts search into count mode, the payload return is shifted considerably\n* page - The page to return\n* retvals - The specific fields in the response (similar to #poll, see 3taps docs for details)\n* rpp - The number of posts per page\n* sort - Sorts results, supports `timestamp`, `-timestamp`, `price`, `-price` and `distance`\n* tier - The tier to return\n\nThe following example performs a search for all postings with `fixie` in the body located within San Francisco, California:\n\n```javascript\nvar\n  options = {\n    body : 'fixie',\n    'location.city' : 'USA-SFO-SNF'\n  },\n  threeTapsClient = require('3taps')({ apikey : 'my-api-key' });\n\nthreeTapsClient.search(\n  options,\n  function (err, data) {\n    // work with location here\n  });\n```\n\nThe response is similar to the following:\n\n```javascript\n{\n  \"next_page\": 1,\n  \"time_search\": 4.912137985229492,\n  \"success\": true,\n  \"time_taken\": 163.88916969299316,\n  \"anchor\": 1574246415,\n  \"time_fetch\": 5.389928817749023,\n  \"num_matches\": 33,\n  \"postings\": [\n    {\n      \"category\": \"SBIK\",\n      \"timestamp\": 1417790322,\n      \"id\": 1573798080,\n      \"source\": \"CRAIG\",\n      \"location\": {\n        \"city\": \"USA-SFO-SNF\",\n        \"geolocation_status\": 3,\n        \"metro\": \"USA-SFO\",\n        \"locality\": \"USA-SFO-BEN\",\n        \"country\": \"USA\",\n        \"region\": \"USA-SFO-SAF\",\n        \"zipcode\": \"USA-94110\",\n        \"long\": \"-122.4158\",\n        \"county\": \"USA-CA-SAF\",\n        \"state\": \"USA-CA\",\n        \"lat\": \"37.74299\",\n        \"formatted_address\": \"Bernal Heights Summit, San Francisco, CA 94110, USA\",\n        \"accuracy\": 8\n      },\n      \"external_id\": \"4787190734\",\n      \"heading\": \"2013 Ridley Excalibur Road Bike Frame PRICE DROP Or Best Offer\",\n      \"external_url\": \"http://sfbay.craigslist.org/sby/bik/4787190734.html\"\n    },\n    {\n      \"category\": \"VPAR\",\n      \"timestamp\": 1417790193,\n      \"id\": 1573694799,\n      \"source\": \"CRAIG\",\n      \"location\": {\n        \"city\": \"USA-SFO-SNF\",\n        \"geolocation_status\": 3,\n        \"metro\": \"USA-SFO\",\n        \"locality\": \"USA-SFO-BEN\",\n        \"country\": \"USA\",\n        \"region\": \"USA-SFO-SAF\",\n        \"zipcode\": \"USA-94110\",\n        \"long\": \"-122.4158\",\n        \"county\": \"USA-CA-SAF\",\n        \"state\": \"USA-CA\",\n        \"lat\": \"37.74299\",\n        \"formatted_address\": \"Bernal Heights Summit, San Francisco, CA 94110, USA\",\n        \"accuracy\": 8\n      },\n      \"external_id\": \"4788044842\",\n      \"heading\": \"3T IONIC 25 TEAM STEALTH CARBON SEATPOST\",\n      \"external_url\": \"http://sfbay.craigslist.org/sby/bop/4788044842.html\"\n    },\n    // more results ...\n  ],\n  \"next_tier\": 0\n}\n```\n\n## Development\n\n### Running Tests\n\nThe `package.json` file is wired up to run jshint, unit tests and code coverage reporting, but not functional tests when running `npm test`.\n\n```bash\nnpm test\n```\n\n#### Unit Tests\n\n```bash\ngulp jshint\n```\n\n#### Unit Tests\n\n```bash\ngulp test-unit\n```\n\n#### Test Coverage\n\nWhen running test coverage, an istanbul report will be created at `./reports/lcov-report/lib/index.js.html`\n\n```bash\ngulp test-coverage\nopen reports/lcov-report/lib/index.js.html\n```\n\n#### Functional Tests\n\nTo run functional tests, you'll need to export an environment variable with your 3taps API key:\n\n```bash\nexport THREETAPS_APIKEY=my-key-goes-here\n```\n\nTo verify whether your key is properly set, simply echo from the command line:\n\n```bash\necho $THREETAPS_APIKEY\n```\n\n_note: You may want to consider adding this to your ~/.bash_profile so that it is always set when you open a terminal_\n\nNow, you can run the functional tests using gulp with the following command:\n\n```bash\ngulp test-functional\n```\n","maintainers":[{"name":"brozeph","email":"joshua.thomas@gmail.com"}],"time":{"modified":"2022-06-12T14:07:30.214Z","created":"2014-12-05T18:30:43.389Z","0.1.1":"2014-12-05T18:30:43.389Z","0.1.2":"2014-12-05T19:05:27.498Z","0.1.3":"2014-12-09T16:48:33.919Z","0.1.4":"2014-12-30T16:54:53.034Z","0.1.5":"2014-12-30T18:55:02.338Z","0.1.6":"2014-12-30T20:42:12.341Z"},"homepage":"https://github.com/brozeph/3taps","keywords":["3taps"],"repository":{"type":"git","url":"git@github.com:brozeph/3taps.git"},"author":{"name":"@brozeph"},"bugs":{"url":"https://github.com/brozeph/3taps/issues"},"license":"MIT","readmeFilename":"readme.md"}