yandex-xml
Advanced tools
Comparing version 1.0.1 to 1.0.2
12
index.js
// Copyright (c) 2018 Nazar Ugrinovsky | ||
const | ||
const | ||
xml2js = require('xml2js'), | ||
@@ -38,3 +38,3 @@ rp = require('request-promise'); | ||
* Http request to Yandex | ||
* @param {String} query | ||
* @param {Object} options | ||
* @return {String} https answer | ||
@@ -66,3 +66,3 @@ */ | ||
const res = await this.convert(xml); | ||
if ( | ||
@@ -89,7 +89,7 @@ !res.yandexsearch || | ||
} | ||
const groups = res.yandexsearch.response[0].results[0].grouping[0].group; | ||
const elements = []; | ||
groups.forEach((el, i, arr) => { | ||
@@ -96,0 +96,0 @@ const doc = el.doc[0]; |
{ | ||
"name": "yandex-xml", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Yandex.XML API", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,3 +0,2 @@ | ||
# yandex-xml | ||
================== | ||
# Yandex.XML API Wrapper | ||
@@ -7,3 +6,3 @@ ES6 Interface for Yandex XML search | ||
## Installation | ||
```$ npm install fredure/yandex-xml``` | ||
```$ npm install yandex-xml``` | ||
@@ -10,0 +9,0 @@ ## Usage |
4789
26