我是android后端编程的新手。通常我会在API中制作一个API方法。我很好奇我们是否可以在一个类中使用两个API方法。我在Google上搜索,但未得到任何答案。
例如它的我的代码和一个API方法

  @Api(name = "InformationAPI",
            version = "v1",
            namespace = @ApiNamespace(ownerDomain = "backend.labs.com", ownerName = "backend.labs.com", packagePath = ""))
    public class EntryEndpoint {

        @ApiMethod(name = "addEntry")
        public Result addEntry(
                @Named("Name") String name,

        ) throws SQLException {

            Connection conn = getConnection();
            Result result = new Result();
            Boolean opsFlag;
            try {
                opsFlag = executeInsertQuery(conn, name);
                result.setIsSuccess(opsFlag);
            } catch (SQLException e) {
                e.printStackTrace();
            }
            return result;
        }

最佳答案

是。
有关库的更多信息,请检查:https://packetzoom.com/blog/which-android-http-library-to-use.html
有关示例的更多信息:https://github.com/traex/RetrofitExample

09-30 15:43
查看更多