Move plugin docs to plugin folders
Summary: Moved plugin documentation and related assets to plugin folders, fixed links and configured redirects where required. Now these docs are used for both showing docs in Flipper and generating Flipper docs website. Reviewed By: passy Differential Revision: D29465567 fbshipit-source-id: 3ec4240b215b0d5baea5154f64266a9ba7ead3a5
This commit is contained in:
committed by
Facebook GitHub Bot
parent
4ad7a70ee3
commit
039d3a4a08
25
desktop/plugins/public/network/docs/protobuf-retrofit.mdx
Normal file
25
desktop/plugins/public/network/docs/protobuf-retrofit.mdx
Normal file
@@ -0,0 +1,25 @@
|
||||
### Gradle Dependencies
|
||||
|
||||
Ensure that you already have an explicit dependency in your application's
|
||||
`build.gradle` including the plugin dependency, e.g.
|
||||
|
||||
```groovy
|
||||
dependencies {
|
||||
implementation "com.squareup.retrofit2:retrofit:2.9.0"
|
||||
implementation "com.squareup.retrofit2:converter-protobuf:2.9.0"
|
||||
|
||||
// update version below to match latest Flipper client app
|
||||
debugImplementation "com.facebook.flipper:flipper-retrofit2-protobuf-plugin:0.84.0"
|
||||
}
|
||||
```
|
||||
|
||||
### Sending Retrofit Service
|
||||
|
||||
Suppose you have a Retrofit service interface `PersonService` which has Protobuf body or return types. At the time you create your implementation, call the plugin with your `baseUrl` and service class:
|
||||
|
||||
```
|
||||
import com.facebook.flipper.plugins.retrofit2protobuf.SendProtobufToFlipperFromRetrofit
|
||||
...
|
||||
val personService = retrofit.create(PersonService::class.java)
|
||||
SendProtobufToFlipperFromRetrofit(baseUrl, PersonService::class.java)
|
||||
```
|
||||
@@ -1,5 +1,6 @@
|
||||
import Tabs from '@theme/Tabs';
|
||||
import TabItem from '@theme/TabItem';
|
||||
import ProtobufRetrofitSetup from './protobuf-retrofit.mdx';
|
||||
|
||||
To use the network plugin, you need to add the plugin to your Flipper client instance.
|
||||
|
||||
@@ -94,3 +95,7 @@ client?.add(FlipperKitNetworkPlugin(networkAdapter: SKIOSNetworkAdapter()))
|
||||
|
||||
</TabItem>
|
||||
</Tabs>
|
||||
|
||||
## Protobut + Retrofit Setup
|
||||
|
||||
<ProtobufRetrofitSetup />
|
||||
|
||||
Reference in New Issue
Block a user