{"id":3559,"url":"https://github.com/anton46/IceNet","last_synced_at":"2025-08-03T20:32:43.989Z","repository":{"id":22335892,"uuid":"25671508","full_name":"anton46/IceNet","owner":"anton46","description":null,"archived":false,"fork":false,"pushed_at":"2014-11-18T05:18:22.000Z","size":863,"stargazers_count":62,"open_issues_count":1,"forks_count":13,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-08-16T14:34:46.391Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anton46.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-24T04:24:47.000Z","updated_at":"2024-04-18T15:09:51.000Z","dependencies_parsed_at":"2022-08-20T10:40:07.351Z","dependency_job_id":null,"html_url":"https://github.com/anton46/IceNet","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton46%2FIceNet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton46%2FIceNet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton46%2FIceNet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anton46%2FIceNet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anton46","download_url":"https://codeload.github.com/anton46/IceNet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":228567009,"owners_count":17937983,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-01-05T20:16:44.937Z","updated_at":"2024-12-07T05:30:40.287Z","avatar_url":"https://github.com/anton46.png","language":"Java","funding_links":[],"categories":["Libraries","库"],"sub_categories":["Networking","[](https://github.com/JStumpp/awesome-android/blob/master/readme.md#networking)网络"],"readme":"IceNet\n======\n[![Android Arsenal](https://img.shields.io/badge/Android%20Arsenal-IceNet-brightgreen.svg?style=flat)](https://android-arsenal.com/details/1/1054)\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.anton46/IceNet/badge.svg?style=flat)](https://maven-badges.herokuapp.com/maven-central/com.anton46/IceNet/)\n\n**FAST, SIMPLE, EASY**  \nThis library is an Android networking wrapper consisting of a combination of [Volley](https://github.com/mcxiaoke/android-volley), [OkHttp](https://github.com/square/okhttp) and [Gson](https://code.google.com/p/google-gson/). For more information see the [website](http://anton46.com/icenet-fast-simple-and-easy-networking-for-android/).\n\n\n\nUsage\n=====\n\n**Gradle**\n```gradle\ncompile 'com.anton46:IceNet:1.0.2'\n````\n**Maven**\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.anton46\u003c/groupId\u003e\n    \u003cartifactId\u003eIceNet\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n````\n\n\n\n\n**Initialization**\n```java\npublic class YourApplications extends Application {\n\t...\n\t\n\t@Override\n    public void onCreate() {\n        super.onCreate();\n        initIceNet();\n    }\n\n    public void initIceNet() {\n        IceNetConfig config = new IceNetConfig.Builder()\n                .setBaseUrl(BuildConfig.SERVER_URL)\n                .setContext(getApplicationContext())\n                .build();\n        IceNet.init(config);\n    }\n    \n    ...\n}\t\n```\n\n**GET REQUEST**\n```java\n\tIceNet.connect()\n                .createRequest()\n                .get()\n                .pathUrl(\"/v1/feeds\")\n                .fromJsonArray()\n                .mappingInto(Feeds.class)\n                .execute(REQUEST_TAG, callback);\n```\n\n**POST REQUEST**\n```java\nIceNet.connect()\n                .createRequest()\n                .post(bodyRequest)\n                .pathUrl(\"/v1/feed\")\n                .fromJsonObject()\n                .mappingInto(PostResponse.class)\n                .execute(REQUEST_TAG, callback);\n```\n\n**STRING REQUEST (NEW)**\n```java\nIceNet.connect()\n                .createRequest()\n                .get()\n                .pathUrl(\"/string\")\n                .fromString()\n                .execute(\"REQUEST_TAG\", callback);\n```\n\n\n**Put this script for Android 4.4.4 (Kitkat) and older `uses-sdk`**\n```xml\n\u003cuses-sdk tools:node=\"replace\"/\u003e\n```\nLicense\n=======\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n   http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanton46%2FIceNet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanton46%2FIceNet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanton46%2FIceNet/lists"}