diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -2,14 +2,14 @@ #include <stdlib.h> #include <string.h> #include <stdbool.h> -#include "icclient.h" -#include "icclient/member.h" -#include "icclient/admin.h" +#include "interchange.h" +#include "interchange/member.h" +#include "interchange/admin.h" -static void print_catalog(struct icclient_catalog *catalog) +static void print_catalog(struct interchange_catalog *catalog) { for (size_t i = 0; i < catalog->length; i++) { - struct icclient_product *product = catalog->products[i]; + struct interchange_product *product = catalog->products[i]; printf("sku: %s | " "desc: %s | " "img: %s | " @@ -22,19 +22,19 @@ static void print_catalog(struct icclient_catalog *catalog) product->category ); } - icclient_free_catalog(catalog); + interchange_free_catalog(catalog); } -static void print(icclient_response *response) +static void print(interchange_response *response) { printf("%s\n", response->data); } int main(int argc, char *argv[]) { - icclient_init("https://demo.interchangecommerce.org/i/demo", "/demo/images", NULL); - icclient_allproducts(NULL, print_catalog); - icclient_admin_login("demo", "demo", print, NULL); - icclient_member_login("kirk@icdevgroup.net", "kirk", print, NULL); - icclient_cleanup(); + interchange_init("https://demo.interchangecommerce.org/i/demo", "/demo/images", NULL); + interchange_allproducts(NULL, print_catalog); + interchange_admin_login("demo", "demo", print, NULL); + interchange_member_login("kirk@icdevgroup.net", "kirk", print, NULL); + interchange_cleanup(); } |