Code Monkey home page Code Monkey logo

kotlin-vk-api's People

Contributors

alatushkin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

kotlin-vk-api's Issues

Переезд на ktor

Добрый день!
Хочу переехать на v5.87 с помощью вашего нагенеренного API. Но сейчас я использую ktor, и переезжать на вашу httpclient-либу очень бы не хотелось.
Попробую как-нибудь прибить ktor сбоку гвоздями 😄

Инверсия зависимости от HttpClient

Цель HttpClient должна быть - не описать самый крутой интерфейс HTTP-клиента, подходящий для любых целей (здесь нам не догнать существующих гигантов), а описать минимальный интерфейс, который нужен для работы ВК-клиента. Так же, как в Java VK API интерфейс TransportClient - минимальный интерфейс, который не претендует на общезначимость.

interface TransportClient {
    fun get(String url): ClientResponse
    fun post(String url, String body): ClientResponse
    fun post(String url, String fileName, File file): ClientResponse
    fun post(String url, String body, String contentType): ClientResponse
    fun get(String url, String contentType): ClientResponse
    fun post(String url): ClientResponse
    fun delete(String url): ClientResponse
    fun delete(String url, String body): ClientResponse
    fun delete(String url, String body, String contentType): ClientResponse
}

Можно взять его и добавить везде suspend. Такой интерфейс реализовать намного проще, чем тот, который сейчас лежит в common-http-client. Далее, HttpClient нужно переименовать во что-нибудь, ясно выражающее узкую специализацию. Сам интерфейс должен переехать в kotlin-vk-api, а вот его тривиальная реализация на Jre должна остаться в common-http-client.

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.