Coder Social home page Coder Social logo

asckit's People

Contributors

blackjacx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

asckit's Issues

[ASCKit] Base ASC on Library Bagbutik

Bagbutik contains a library for the ASC API. Using it has multiple advantages:

  • the lib is Auto updated whenever there is a new version of the API
  • I just have to implement the commands and don't have to take care of the network implementation anymore

Warning

The other mayby much more popular App Store Connect library is Fastlane::Spaceship

Replace all `List*` operations by a generic one

Replace all List* operations by the following generic operation:

public final class ListResourceOperation<Success, Failure: Swift.Error>: AsyncResultOperation<Success, Failure> {

    #warning("make global singletom from network")
    let network = Network()

    let filters: [Filter]
    let limit: UInt

    public init(filters: [Filter] = [], limit: UInt = ASCKit.Constants.pagingLimit) {
        self.filters = filters
        self.limit = limit
    }

    public override func main() {
        // Make `Success` conform to a protocol which lists all implemented resources this protocol is implemented as enum in ASCResource - this is gonna be cool and will make the whole API quite flexible ๐ŸŽ‰ 
        let resource = AscResource.list<Success>(filters: filters, limit: limit)
        network.request(resource: resource) { [weak self] (result: RequestResult<Success>) in
            self?.finish(with: result)
        }
    }
}

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.