mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-09 00:01:18 +00:00
[hub] start
This commit is contained in:
17
erpnext/hub_node/__init__.py
Normal file
17
erpnext/hub_node/__init__.py
Normal file
@@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors and contributors
|
||||
# For license information, please see license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe, requests
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_items(text, start, limit):
|
||||
hub = frappe.get_single("Hub Settings")
|
||||
response = requests.get(hub.hub_url + "/api/method/hub.hub.api.get_items", params={
|
||||
"access_token": hub.access_token,
|
||||
"text": text,
|
||||
"start": start,
|
||||
"limit": limit
|
||||
})
|
||||
response.raise_for_status()
|
||||
return response.json().get("message")
|
||||
Reference in New Issue
Block a user