Giter Club home page Giter Club logo

retroravelry's Introduction

Retro-Ravelry

Maven Central

Kotlin wrapper for the Ravelry API using Retrofit and Kotlin Coroutines.

Download

With Gradle:

dependencies {
    implementation("com.caseykulm.retroravelry:retroravelry:0.11.0")
}

License

Copyright 2016 Casey Kulm

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Setup

  1. Get the secrets.properties file from 1Password.
  2. Add it to the root of the project

Checks

Quick start

Run the following to mimic what CI is running:

./.circleci/checks.sh

Note: Make sure you mark this file executable with chmod +x ./.circleci/checks.sh

More info

We are running our CI on Circle CI with the following checks:

  • ktlint
  • unit tests
  • build a JAR successfully

ktlint

Ktlint may report errors. If it does you can run:

./gradlew ktlintFormat

to attempt to fix it. It can fix most things, but sometimes it will tell you that you need to resolve something by hand.

Browsing API

There is a ravelry_postman_collection.json file available at the root of this repo that can be imported into the Postman application to browse the REST API via a collection. This in turn can be used to generate an OAuth2 access token which you can use in this project to test your changes.

retroravelry's People

Contributors

caseykulm avatar dependabot-preview[bot] avatar senojl avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

retroravelry's Issues

Get unit tests working

Need to be able to test initially with live data, so we need to make sure to git ignore the api keys.

Eventually once we have everything completed we can switch the completed live tests to mock data.

Library Search

Implement https://www.ravelry.com/api#library_search

API in RavelryApi should be,

fun searchLibrary(
  username: String, 
  query: String,
  queryType: String,
  type: String,
  sort: String,
  page: Int,
  pageSize: Int): Flowable<SearchLibraryResponse>

We already have my library, but need to add this to be able to browse other peoples library.

Refactor Pattern and Stash entities out

For now we haven't done enough to define an entity layer, and should shift the redundant Pattern and Stash models out of the project in favor of the models

Update README to not be incorrect

  • Keep the license
  • Remove the pulling from Maven/Gradle comments for now since they are not implemented yet
  • Remove the RxJava 1 line. Maybe mention that this API is specifically an RxJava 2 API for hitting the Ravelry REST API

Pattern Search

Implement https://www.ravelry.com/api#patterns_search

API in RavelryApi should be,

fun searchPatterns(
  query: String, 
  page: Int, 
  pageSize: Int, 
  personal_attributes: Boolean): Flowable<SearchPatternsResponse>

and it should be implemented in the RavelryClient, using the RavelryRetroApi under the hood of the RavelryClient class.

We should also remove the existing searchPatterns call.

SearchPatternsResponse already exists. We need to add RxJava 2.

Setup Travis CI to run tests

Should run ./gradlew clean check to run the tests.

Should convert tests to not hit the live network, but make it easy to manually swap in the oauth_secrets.json contents to make TDD simpler. We can save JSON responses to the resources directory, and use those with OkHttp Mock Web Server for the tests that should actually run on CI. This will help the tests run much much faster, and still allow regression testing.

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.