summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--client.c6
-rw-r--r--icclient/client.h10
2 files changed, 16 insertions, 0 deletions
diff --git a/client.c b/client.c
index e829a88..18eca17 100644
--- a/client.c
+++ b/client.c
@@ -45,6 +45,12 @@ void icclient_allproducts(size_t (*handler)(void *, size_t, size_t, void *)
request(handler, (void *)catalogptr, NULL, "%s", "All-Products");
}
+void icclient_flypage(size_t (*handler)(void *, size_t, size_t, void *),
+ icclient_product **productptr, const char *sku)
+{
+ request(handler, (void *)productptr, NULL, "%s", sku);
+}
+
static int prodcmp(const void *product1, const void *product2)
{
return strcmp((*(icclient_product * const *)product1)->sku
diff --git a/icclient/client.h b/icclient/client.h
index 600686a..f35b9a2 100644
--- a/icclient/client.h
+++ b/icclient/client.h
@@ -28,6 +28,16 @@ extern "C" {
, struct icclient_catalog **catalogptr);
/*!
+ * \brief For fetching data about a specific product.
+ * \param handler A pointer to a cURL write function callback.
+ * \param productptr A pointer to pointer to the product to store the data.
+ * \param sku The SKU of the item to order.
+ */
+ void icclient_flypage(size_t (*handler)(void *contents, size_t size,
+ size_t nmemb, void *userdata),
+ struct icclient_product **productptr, const char *sku);
+
+ /*!
* \brief For putting an item to a cart.
* \param orderptr A pointer to pointer to the order.
* \param sku The SKU of the item to order.