Giter Club home page Giter Club logo

extensions-ecwid's Introduction

C# client for Ecwid API

Build status NuGet Pre Release

This repository contains models and services C# classes for Ecwid API v1 and v3.

C# Ecwid client is a modern, asynchronous, fast, testable client for Ecwid API

var client = new EcwidClient();
var result = await client.Configure(someShopId, someToken).Orders
                .Limit(10)
                .CreatedFrom(DateTime.Today)
                .PaymentStatuses("PAID")
                .GetAsync();

Install

The package is compiled for NET45 and .NET Platform Standard 1.4 which include .NET Core and other targets. Read about it.

PM> Install-Package Ecwid -Pre - services and models

PM> Install-Package Ecwid.Legacy -Pre - Legacy v1 services and models

PM> Install-Package Ecwid.OAuth -Pre - a pipeline OAuth2 wrapper for ASP.NET Core

Ecwid API

You can learn about v3 (general) API here

You can learn about v1 (Legacy) API:

  • Orders API here
  • Products API here
  • Instant Order Notifications API here

Namespaces

  • Ecwid - client for API v3
  • Ecwid.Models - model classes for API v3
  • Ecwid.Legacy - client for API v1
  • Ecwid.Legacy.Models - model classes for API v1

How to use

Look wiki pages

extensions-ecwid's People

Contributors

kroniak avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

extensions-ecwid's Issues

Add Pickup Time

I just tagged this onto OrderEntry.cs:

        /// <summary>
        /// Gets or sets order pickup time, e.g 2014-06-06 18:57:19 +0000.
        /// </summary>
        /// <value>
        /// The pickup time.
        /// </value>
        [JsonProperty("pickupTime")]
        public DateTime PickupTime { get; set; }

I notice that the notification emails will use this time nicely. E.g. set to "PROCESSING" add a Pickup Time then update the order :)

Discount Coupons API

It looks like the Discount Coupons API is not yet implemented.

Is there any reason why I shouldn't have a crack at it and submit a PR?

I assume following the existing pattern of code should be fine. Creating a partial class EcwidClientDiscountCoupons.

From what I can see I won't be able to implement the 'real' tests, as the mocky api will need to be set up.

GPL License

Is there a particular reason that GPL v3 is being used for this project?

I would imagine most products that will interact with the ecwid API are going to be proprietary software and are thus excluded from referencing this library.

Would you consider lowering the licensing requirements (perhaps the Apache license)? Or perhaps dual licensing?

Polish documentation

Sync all XML docs between interfaces and classes, try to get one style for documentation.

New ecwid tokens not accepted

Ecwid now issues tokens of the form "secret_xxx", which the library rejects as invalid. The regex needs updating or (preferably) removing, since there's no saying what ecwid tokens will look like in the future.

In the meantime, here's a nasty workaround for anyone else experiencing this issue:

        var credentials = new EcwidCredentials(Properties.Ecwid.Default.StoreId, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
        typeof(EcwidCredentials).GetField("_token", System.Reflection.BindingFlags.NonPublic|System.Reflection.BindingFlags.Instance).SetValue(credentials, Properties.Ecwid.Default.AccessToken);
        client = new EcwidClient(credentials);

Add Ecwid API v1 limits

Need to implement

Rate Limiting

The default rate limit per IP for calls to the REST API is 50 requests per 5 seconds, 400 requests in 50 seconds, 800 requests in 500 seconds.

No more than 10 simultaneous connections from one IP.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.