<commit_before>/*
 * Copyright (C) 2017 <NAME> <<EMAIL>>
 *
 * Distributed under terms of the BSD 2-Clause license.
 */
import jsonpWithCallback from 'jsonp';

const API_BASE = 'https://api.flickr.com/services';

class Api {
	static jsonp(path, options) {
		return new Promise(
				(resolve, reject) => jsonpWithCallback(`${API_BASE}${path}`, options,
					(err, data) => err ? reject({ error }) : resolve({ data })));
	}

  static fetchFeed() {
    return Api.jsonp('/feeds/photos_public.gne?format=json', { name: 'jsonFlickrFeed' });
  }
}

export default Api;<commit_msg>Fixed issue with wrong property 'error' name in API.jsonp.<commit_after>/*
 * Copyright (C) 2017 <NAME> <<EMAIL>>
 *
 * Distributed under terms of the BSD 2-Clause license.
 */
import jsonpWithCallback from 'jsonp';

const API_BASE = 'https://api.flickr.com/services';

class Api {
	static jsonp(path, options) {
		return new Promise(
				(resolve, reject) => jsonpWithCallback(`${API_BASE}${path}`, options,
					(err, data) => err ? reject({ err }) : resolve({ data })));
	}

  static fetchFeed() {
    return Api.jsonp('/feeds/photos_public.gne?format=json', { name: 'jsonFlickrFeed' });
  }
}

export default Api;
{'fraction_non_alphanumeric': 0.16624685138539042, 'fraction_numerical': 0.008396305625524769, 'mean_word_length': 4.205240174672489, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 13, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4470107', 'n_tokens_mistral': 428, 'n_tokens_neox': 398, 'n_words': 105}