3 Star 4 Fork 0

华为移动服务 / hms-drive-serverdemo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
README.md 3.32 KB
一键复制 编辑 原始数据 按行查看 历史
Meixu 提交于 2020-09-28 15:09 . Update README.md

HMS Drivekit Serverdemo

English | 中文

Table of Contents

Introduction

In this demo, requests/responses are sent/received by using the HTTP client. All open APIs provided by HUAWEI Drive Kit ("Dive Kit") can be accessed by this demo. Note: Access_token (AT) needs to be obtained by using HUAWEI Account Kit.

Installation

Before using HUAWEI Drive Kit Server sample code, check whether the JAVA and Maven environment has been installed. Decompress the HUAWEI Drive Kit Server sample code package. The steps to run the Drive service sample code are as follows:

  1. Import project to your JAVA Integrated Development Environment.
  2. Use Maven to compile this project.
  3. Obtain parameters in the Main function of each Java file in advance. For example, obtain the AT through the HMS SDK. See details : HUAWEI Drive Service Development Preparation

Supported Environments

Java 1.8 or a later version is recommended.
Maven 3.6.1 is recommended.

Configuration

No additional configuration is required.

Getting Started

Currently, the core capabilities of Drive Kit include uploading, downloading, deleting, recycling, and searching for files in Drive as well as querying and monitoring file changes.

  1. Obtain parameters in the Main function of each Java file in advance. For example, obtain the AT through the HMS SDK.
  2. Call the required APIs. Some APIs depend on each other, for example: Before calling changesSubscribe and ChangesList, you need to call ChangesGetStartCursor to get the query parameter startCursor. Before calling ChannelsStop, you need to create a valid channel for Watch. Before calling FilesResume, call FilesCreateResume or FilesUpdateResume to obtain uploadId and serverId. Before calling FilesCopy, FilesDelete, FilesGet, FilesUpdate, FilesUpdate*, FilesSubscribe, or FilesGet*, you need to call FilesCreate* to create a file and get fileId.

Question or issues

If you want to evaluate more about HMS Core, r/HMSCore on Reddit is for you to keep up with latest news about HMS Core, and to exchange insights with other developers.

If you have questions about how to use HMS samples, try the following options:

  • Stack Overflow is the best place for any programming questions. Be sure to tag your question with huawei-mobile-services.
  • Huawei Developer Forum HMS Core Module is great for general questions, or seeking recommendations and opinions.

If you run into a bug in our samples, please submit an issue to the Repository. Even better you can submit a Pull Request with a fix.

License

Drivekit server Java sample is licensed under the Apache License, version 2.0.

马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/hms-core/hms-drive-serverdemo.git
git@gitee.com:hms-core/hms-drive-serverdemo.git
hms-core
hms-drive-serverdemo
hms-drive-serverdemo
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891