@@ -0,0 +1,1949 @@
+/*%0A * Copyright (c) 2012-2015, b3log.org%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.b3log.symphony.api;%0A%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0Aimport org.b3log.latke.servlet.HTTPRequestContext;%0Aimport org.b3log.latke.servlet.HTTPRequestMethod;%0Aimport org.b3log.latke.servlet.annotation.RequestProcessing;%0Aimport org.b3log.latke.servlet.renderer.JSONRenderer;%0Aimport org.json.JSONObject;%0A%0A/**%0A * Activity api processor.%0A *%0A * %3Cul%3E%0A * %3Cli%3EDaily checkin (/api/v1/activities/checkin), POST%3C/li%3E%0A * %3C/ul%3E%0A *%0A * @author %3Ca href=%22http://wdx.me%22%3EDX%3C/a%3E%0A * @version 1.0.0.0, Aug 13, 2015%0A * @since 0.2.5%0A */%0Apublic class ActivityProcessor %7B%0A    %0A    /**%0A     * Mobile logins user.%0A     *%0A     * @param context the specified context%0A     * @param request the specified request%0A     * @param response the specified response%0A     */%0A    @RequestProcessing(value = %22/api/v1/activities/checkin%22, method = HTTPRequestMethod.POST)%0A    public void checkin(final HTTPRequestContext context, final HttpServletRequest request, final HttpServletResponse response) %7B%0A        final JSONRenderer renderer = new JSONRenderer();%0A        context.setRenderer(renderer);%0A        final JSONObject ret = new JSONObject();%0A        renderer.setJSONObject(ret);%0A        ret.put(%22balance%22, 1905);%0A        ret.put(%22reward%22, 5);%0A        ret.put(%22streak%22, 2);%0A        ret.put(%22streaked%22, 10);%0A    %7D%0A%7D%0A

add demo data for checkin.