All Projects → theapache64 → Retrosheet

theapache64 / Retrosheet

Licence: apache-2.0
Turn Google Spreadsheet to JSON endpoint (for Android and JVM) for FREE (100%)

Programming Languages

kotlin
9241 projects

Projects that are alternatives of or similar to Retrosheet

Meteorite
一个基于Android MVP的简单明了的指引性通用架构,目的是帮助更多的开发者去全面了解实践开发相关的各种技术,快速搭建属于自已的APP。这个项目涉及到如下技术的实际应用:1、MVP 2、网络请求(Novate基于rxjava,okhttp,retrofit封装架构)3、DbFlow(可保存文件入SD卡) 4、6.0权限申请 5、XRecyclerView 6、万能Adapter7、异常处理 8、日志打印 9、屏幕适配 10、代码混淆 11、多渠道打包 12、内存泄露检测 13、热修复 14、升级更新 15、极光推送 工程更新完善中……欢迎关注 @特别感谢ZJ.Y的Logo支持。
Stars: ✭ 49 (-80%)
Mutual labels:  okhttp, retrofit
Alfonz
Mr. Alfonz is here to help you build your Android app, make the development process easier and avoid boilerplate code.
Stars: ✭ 90 (-63.27%)
Mutual labels:  rest-api, retrofit
Jetpackmvvm
🐔🏀一个Jetpack结合MVVM的快速开发框架,基于MVVM模式集成谷歌官方推荐的JetPack组件库:LiveData、ViewModel、Lifecycle、Navigation组件 使用Kotlin语言,添加大量拓展函数,简化代码 加入Retrofit网络请求,协程,帮你简化各种操作,让你快速开发项目
Stars: ✭ 1,100 (+348.98%)
Mutual labels:  okhttp, retrofit
Mvvmhabitcomponent
👕基于MVVMHabit框架,结合阿里ARouter打造的一套Android MVVM组件化开发方案
Stars: ✭ 857 (+249.8%)
Mutual labels:  okhttp, retrofit
Retrofiturlmanager
🔮 Let Retrofit support multiple baseUrl and can be change the baseUrl at runtime (以最简洁的 Api 让 Retrofit 同时支持多个 BaseUrl 以及动态改变 BaseUrl).
Stars: ✭ 1,961 (+700.41%)
Mutual labels:  okhttp, retrofit
Awesome Third Library Source Analysis
📖 Deep understanding of popular open source library source code (optimizing...)
Stars: ✭ 866 (+253.47%)
Mutual labels:  okhttp, retrofit
Contentful.java
Java SDK for Contentful's Content Delivery API
Stars: ✭ 63 (-74.29%)
Mutual labels:  okhttp, retrofit
Easygank
💊 The project build framework based on the Rx series and MVP pattern.
Stars: ✭ 750 (+206.12%)
Mutual labels:  okhttp, retrofit
Kingtv
📺 高仿全民直播(全民TV),项目采用 MVP + RXJava + Retrofit + OKHttp + Material Design + Dagger2 + Base + Glide + GreenDao构建。因为全民TV已经凉了,导致App已经连不上。所以本项目已暂停维护。仅供学习。 推荐MVPFrame: https://github.com/jenly1314/MVPFrame 和你值得拥有的MVVMFrame快速开发框架: https://github.com/jenly1314/MVVMFrame
Stars: ✭ 1,594 (+550.61%)
Mutual labels:  okhttp, retrofit
Livedata Call Adapter
A simple LiveData call adapter for retrofit
Stars: ✭ 119 (-51.43%)
Mutual labels:  okhttp, retrofit
Androidall
Android 程序员需要掌握的技术栈:数据结构算法、程序架构、设计模式、性能优化、插件化、热更新、Kotlin、NDK、Jetpack,以及常用的开源框架源码分析如 Flutter、Router、RxJava、Glide、LeakCanary、Dagger2、Retrofit、OkHttp、ButterKnife 等
Stars: ✭ 849 (+246.53%)
Mutual labels:  okhttp, retrofit
Templeapp
Android App which handles the information about temple. People can register and keep a track of all poojas, donations made to the temple.
Stars: ✭ 231 (-5.71%)
Mutual labels:  google-sheets, okhttp
Uplink
A Declarative HTTP Client for Python
Stars: ✭ 824 (+236.33%)
Mutual labels:  rest-api, retrofit
Easygo
基于Kotlin、OkHttp的声明式网络框架,像写HTML界面一样写网络调用代码
Stars: ✭ 40 (-83.67%)
Mutual labels:  okhttp, retrofit
Mvvmhabit
goldze: 本人喜欢尝试新的技术,以后发现有好用的东西,我将会在企业项目中实战,没有问题了就会把它引入到MVVMHabit中,一直维护着这套框架,谢谢各位朋友的支持。如果觉得这套框架不错的话,麻烦点个 star,你的支持则是我前进的动力!
Stars: ✭ 6,789 (+2671.02%)
Mutual labels:  okhttp, retrofit
Fetch
The best file downloader library for Android
Stars: ✭ 1,124 (+358.78%)
Mutual labels:  okhttp, retrofit
Retrofitcache
RetrofitCache让retrofit2+okhttp3+rxjava配置缓存如此简单。通过注解配置,可以针对每一个接口灵活配置缓存策略;同时让每一个接口方便支持数据模拟,可以代码减小侵入性,模拟数据可以从内存,Assets,url轻松获取。
Stars: ✭ 647 (+164.08%)
Mutual labels:  okhttp, retrofit
Retrofit Spring Boot Starter
A springboot starter for retrofit, and supports many functional feature enhancements, greatly simplifying development.(实现了Retrofit与spring-boot框架快速整合,并支持了诸多功能增强,极大简化开发)
Stars: ✭ 658 (+168.57%)
Mutual labels:  rest-api, retrofit
Aachulk
️🔥️🔥️🔥AACHulk是以Google的ViewModel+DataBinding+LiveData+Lifecycles框架为基础, 结合Okhttp+Retrofit+BaseRecyclerViewAdapterHelper+SmartRefreshLayout+ARouter打造的一款快速MVVM开发框架
Stars: ✭ 109 (-55.51%)
Mutual labels:  okhttp, retrofit
Progressmanager
⏳ Listen the progress of downloading and uploading in Okhttp, compatible Retrofit and Glide (一行代码即可监听 App 中所有网络链接的上传以及下载进度, 包括 Glide 的图片加载进度).
Stars: ✭ 2,463 (+905.31%)
Mutual labels:  okhttp, retrofit

retrosheet 📄

Turn Google Spreadsheet to JSON endpoint. [For Android and JVM].

https://github.com/theapache64/notes

Benefits 🤗

  • Since you're using Google's server, you don't have to worry about server health.
  • Rapid response and unlimited bandwidth
  • Since we're using OkHttpInterceptor under the hood, you can easily migrate to your REST API without any significant code change.
  • You don't have to create an admin panel/dashboard to control the data. You can simply use Google Spreadsheet app.
  • You can use this library to create POC/MVP instantly

Install 🤝

    implementation 'com.theapache64:retrosheet:1.2.3'

Usage ⌨️

How to write data ? ✍️

Step 1 : Writing Data To Sheet

Step 2

  • Select response destination and select/create a Google sheet to store the responses.

Step 3

  • Now you can open the sheet and change sheet name and column names if you want. This is just to make the Google sheet table look like a real database table (optional)

I've changed to

Step 4

  • Next, Press the Send button and copy the form link

Step 5

  • Now let's go to our code and create our RetrosheetInterceptor
val retrosheetInterceptor = RetrosheetInterceptor.Builder()
    .setLogging(false)
    // To Read
    .addSheet(
        "notes", // sheet name
        "created_at", "title", "description" // columns in same order
    )
    // To write
    .addForm(
        ADD_NOTE_ENDPOINT,
        "https://docs.google.com/forms/d/e/1FAIpQLSdmavg6P4eZTmIu-0M7xF_z-qDCHdpGebX8MGL43HSGAXcd3w/viewform?usp=sf_link" // form link
    )
    .build()

Step 6

  • Next, let's create a normal Retrofit API interface
interface NotesApi {

    @Read("SELECT *") 
    @GET("notes") // sheet name
    suspend fun getNotes(): List<Note>

    @Write
    @POST(ADD_NOTE_ENDPOINT) // form name
    suspend fun addNote(@Body addNoteRequest: AddNoteRequest): AddNoteRequest
}
  • @Write : To write data to a sheet

  • @Read : To read data from a sheet.

You can lean more about query language from here : https://developers.google.com/chart/interactive/docs/querylanguage.

NOTE: You can use your column name in the query rather than using column letter such as A,B,C etc.

How to read data ? 📖

Step 7 : Reading data from Sheet

  • We're done configuring the writing part. Now let's finish the reading part. Create/open a google sheet, (it can be either form connected, or a simple Google sheet).

  • Press Share and copy the link

copy-link

Step 8

  • Remove contents after the last forward slash from the copied link.

For example, this

https://docs.google.com/spreadsheets/d/1IcZTH6-g7cZeht_xr82SHJOuJXD_p55QueMrZcnsAvQ/edit?usp=sharing

would become this

https://docs.google.com/spreadsheets/d/1IcZTH6-g7cZeht_xr82SHJOuJXD_p55QueMrZcnsAvQ/

Step 9

  • Finally, Set the Retrofit or OkHttp's baseUrl with the above link.

baseUrl

Done 👍

Full Example 🌟

import com.squareup.moshi.Moshi
import com.theapache64.retrosheet.RetrosheetInterceptor
import kotlinx.coroutines.runBlocking
import okhttp3.OkHttpClient
import retrofit2.Retrofit
import retrofit2.converter.moshi.MoshiConverterFactory

/**
 * Created by theapache64 : Jul 21 Tue,2020 @ 02:11
 */
const val ADD_NOTE_ENDPOINT = "add_note"
fun main() = runBlocking {

    val retrosheetInterceptor = RetrosheetInterceptor.Builder()
        .setLogging(false)
        // To Read
        .addSheet(
            "notes", // sheet name
            "created_at", "title", "description" // columns in same order
        )
        // To write
        .addForm(
            ADD_NOTE_ENDPOINT,
            "https://docs.google.com/forms/d/e/1FAIpQLSdmavg6P4eZTmIu-0M7xF_z-qDCHdpGebX8MGL43HSGAXcd3w/viewform?usp=sf_link" // form link
        )
        .build()

    val okHttpClient = OkHttpClient.Builder()
        .addInterceptor(retrosheetInterceptor)
        .build()


    val moshi = Moshi.Builder().build()

    val retrofit = Retrofit.Builder()
        .baseUrl("https://docs.google.com/spreadsheets/d/1YTWKe7_mzuwl7AO1Es1aCtj5S9buh3vKauKCMjx1j_M/") // Sheet's public URL
        .client(okHttpClient)
        .addConverterFactory(MoshiConverterFactory.create(moshi))
        .build()

    val notesApi = retrofit.create(NotesApi::class.java)
    println(notesApi.getNotes())

    // Adding sample order
    val addNote = notesApi.addNote(
        AddNoteRequest("Dynamic Note 1", "Dynamic Desc 1")
    )

    println(addNote)
    Unit
}

Samples 🌠

TODO ☑️

  • Create an online tool to generate model class from sheet link

Author ✍️

  • theapache64
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].