{"id":13343673,"url":"https://github.com/rm3l/now4j","last_synced_at":"2025-03-12T06:30:23.090Z","repository":{"id":22758198,"uuid":"96710268","full_name":"rm3l/now4j","owner":"rm3l","description":"Unofficial Java client for the △ Now API","archived":true,"fork":false,"pushed_at":"2022-01-17T04:00:39.000Z","size":166,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-24T16:49:01.510Z","etag":null,"topics":["api-client","api-wrapper","gradle","gradle-java","java","now","zeit"],"latest_commit_sha":null,"homepage":"http://now4j.rm3l.org/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rm3l.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":"2017-07-09T20:42:48.000Z","updated_at":"2023-01-28T03:45:17.000Z","dependencies_parsed_at":"2022-08-07T10:16:09.935Z","dependency_job_id":null,"html_url":"https://github.com/rm3l/now4j","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3l%2Fnow4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3l%2Fnow4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3l%2Fnow4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rm3l%2Fnow4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rm3l","download_url":"https://codeload.github.com/rm3l/now4j/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243171338,"owners_count":20247876,"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":["api-client","api-wrapper","gradle","gradle-java","java","now","zeit"],"created_at":"2024-07-29T19:31:56.779Z","updated_at":"2025-03-12T06:30:22.416Z","avatar_url":"https://github.com/rm3l.png","language":"Java","funding_links":["https://paypal.me/rm3l"],"categories":[],"sub_categories":[],"readme":"# Now4J : Java Client for the [△ Now](https://zeit.co/now) API\r\n\r\n[![](https://jitpack.io/v/rm3l/now4j.svg)](https://jitpack.io/#rm3l/now4j)\r\n[![Bintray](https://img.shields.io/bintray/v/rm3l/maven/org.rm3l:now4j.svg)](https://bintray.com/rm3l/maven/org.rm3l%3Anow4j) \r\n[![Travis branch](https://img.shields.io/travis/rm3l/now4j/master.svg)](https://travis-ci.org/rm3l/now4j) \r\n[![Coverage Status](https://coveralls.io/repos/github/rm3l/now4j/badge.svg?branch=master)](https://coveralls.io/github/rm3l/now4j?branch=master)  \r\n[![License](https://img.shields.io/badge/license-MIT-green.svg?style=flat)](https://github.com/rm3l/now4j/blob/master/LICENSE) \r\n\r\n[![GitHub watchers](https://img.shields.io/github/watchers/rm3l/now4j.svg?style=social\u0026label=Watch)](https://github.com/rm3l/now4j) \r\n[![GitHub stars](https://img.shields.io/github/stars/rm3l/now4j.svg?style=social\u0026label=Star)](https://github.com/rm3l/now4j) \r\n[![GitHub forks](https://img.shields.io/github/forks/rm3l/now4j.svg?style=social\u0026label=Fork)](https://github.com/rm3l/now4j)\r\n\r\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n**Table of Contents**  *generated with [DocToc](https://github.com/thlorenz/doctoc)*\r\n\n- [What is it?](#what-is-it)\n- [Library](#library)\n  - [Installation](#installation)\n      - [With Gradle](#with-gradle)\n      - [With Maven](#with-maven)\n  - [Usage](#usage)\n  - [Javadoc](#javadoc)\n- [Command Line Interface (CLI)](#command-line-interface-cli)\n- [Building from source](#building-from-source)\n- [Contributing and Improving Now4J!](#contributing-and-improving-now4j)\n- [Credits](#credits)\n- [Developed by](#developed-by)\n- [LICENSE](#license)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\r\n\r\n## What is it?\r\n\r\nZeit's [Now](https://zeit.co/now) is a service allowing to deploy an application \r\n(Node.js or Docker-powered) from your local machine to a remote cloud service in moments.\r\n\r\nNow4J is a Java Client library for accessing the [△ Now API](https://zeit.co/api).\r\n\r\nThis Java Client supports the following core features of the Now API:\r\n- deployments\r\n- domains\r\n- files\r\n- aliases\r\n- certificates\r\n- secrets\r\n\r\nA standalone Command Line Interface (CLI) app is also available for you to manipulate your Now resources.\r\n\r\n## Library\r\n\r\n### Installation\r\n\r\n[comment]: \u003c\u003e (`now4j` is published on both Bintray JCenter and Jitpack.)\r\n`now4j` is published on Bintray JCenter.\r\n\r\n##### With Gradle\r\n\r\n\u003c!--\r\nMake sure you have either JCenter or Jitpack to your list of repositories in your root `build.gradle`:\r\n\r\n```groovy\r\nallprojects {\r\n    repositories {\r\n        //...\r\n        jcenter()                           //To download via JCenter\r\n        maven { url \"https://jitpack.io\" }  //To download via Jitpack\r\n    }\r\n}\r\n```\r\n--\u003e\r\nMake sure you have JCenter added to the list of repositories in your root `build.gradle`:\r\n\r\n```groovy\r\nallprojects {\r\n    repositories {\r\n        //...\r\n        jcenter()\r\n    }\r\n}\r\n```\r\n\r\nThen add `now4j` as a gradle dependency in your `build.gradle`\r\n\r\n```groovy\r\ncompile 'org.rm3l:now4j:1.0.0'\r\n```\r\n\r\n##### With Maven\r\n\r\n\u003c!--\r\nMake sure you have either Jcenter or Jitpack to your list of repositories in your `pom.xml`:\r\n\r\n```xml\r\n\u003crepositories\u003e\r\n    \u003crepository\u003e\r\n      \u003cid\u003ejcenter\u003c/id\u003e\r\n      \u003curl\u003ehttps://jcenter.bintray.com/\u003c/url\u003e\r\n    \u003c/repository\u003e\r\n    \u003crepository\u003e\r\n        \u003cid\u003ejitpack.io\u003c/id\u003e\r\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\r\n    \u003c/repository\u003e\r\n\u003c/repositories\u003e\r\n```\r\n--\u003e\r\nMake sure you have Jcenter added to your list of repositories in your `pom.xml`:\r\n\r\n```xml\r\n\u003crepositories\u003e\r\n    \u003c!-- ... --\u003e\r\n\r\n    \u003crepository\u003e\r\n      \u003cid\u003ejcenter\u003c/id\u003e\r\n      \u003curl\u003ehttps://jcenter.bintray.com/\u003c/url\u003e\r\n    \u003c/repository\u003e\r\n\u003c/repositories\u003e\r\n```\r\n\r\nThen add `now4j` to your `pom.xml` dependencies:\r\n\r\n```xml\r\n\u003cdependency\u003e\r\n    \u003cgroupId\u003eorg.rm3l\u003c/groupId\u003e\r\n    \u003cartifactId\u003enow4j\u003c/artifactId\u003e\r\n    \u003cversion\u003e1.0.0\u003c/version\u003e\r\n\u003c/dependency\u003e\r\n```\r\n\r\n### Usage\r\n\r\nGrab your Zeit Account token [here](https://zeit.co/account#api-tokens).\r\n\r\nInitialize a `NowClient` instance, by calling any of the static `NowCient.create(...)` methods:\r\n\r\n```java\r\nfinal NowClient nowClient = NowCient.create(\u003cmyToken\u003e, \u003cmyTeam\u003e);\r\n```\r\n\r\nPlease note that if you want to read your `token` and `team` from `~/.now.json`, you can simply call:\r\n\r\n```java\r\nfinal NowClient nowClient = NowCient.create();\r\n```\r\n\r\nAnd finally, you can use its methods to retrieve data, e.g,:\r\n\r\n```java\r\nnowClient.getDeployments();\r\n```\r\n\r\nNote that all the methods in `NowClient` are overloaded and come under two forms:\r\n- a synchronous method, e.g: `NowClient#getDeployments()`;\r\n- an asynchronous method of the same name, but taking a `ClientCallback` instance which will \r\n be notified of the response. For example: `NowClient#getDeployments(ClientCallback)`\r\n \r\n### Javadoc\r\n\r\nVisit [https://jitpack.io/com/github/rm3l/now4j/now4j/1.0.0/javadoc](https://jitpack.io/com/github/rm3l/now4j/now4j/1.0.0/javadoc/index.html)\r\n \r\n## Command Line Interface (CLI)\r\n\r\nDownload the CLI binary [here](https://github.com/rm3l/now4j/releases/download/1.0.0/now4j-cli-1.0.0.jar).\r\n\r\n\u003cdetails\u003e\u003csummary\u003ejava -jar now4j-cli-1.0.0.jar --help\u003c/summary\u003e\r\n\r\n```bash\r\nUsage: java -jar now4j-cli-VERSION.jar [options] [command] [command options]\r\n  Options:\r\n    --token, --T\r\n      Now API Token. Read from ~/.now.json if not specified here.\r\n    --team, --t\r\n      Now API Team. Read from ~/.now.json if not specified here.\r\n    --debug, -d\r\n      Debug mode\r\n      Default: false\r\n    --help, -h\r\n      Show this help\r\n  Commands:\r\n    deployments      Manage deployments\r\n      Usage: deployments [options]\r\n        Options:\r\n          --deploymentData\r\n            JSON-serialized description of the deployment to add. The keys \r\n            should represent a file path, with their respective values \r\n            containing the file contents.\r\n          --deploymentId\r\n            ID of deployment\r\n          --fileId\r\n            ID of file\r\n          -add\r\n            Perform a deployment. Required: --deploymentData\r\n            Default: false\r\n          -getFile, -dl\r\n            Get file content. Required: --deploymentId and --fileId\r\n            Default: false\r\n          -list, -ls\r\n            List deployments. Optional: --deploymentId\r\n            Default: false\r\n          -listFiles, -lsFiles\r\n            List file structure of deployment. Required: --deploymentId\r\n            Default: false\r\n          -remove, -rm, -delete, -del\r\n            Remove a deployment. Required: --deploymentId\r\n            Default: false\r\n\r\n    aliases      Manage aliases\r\n      Usage: aliases [options]\r\n        Options:\r\n          --alias\r\n            Hostname or custom url for the alias\r\n          --aliasId\r\n            ID of Alias\r\n          --deploymentId\r\n            ID of Deployment\r\n          -add, -create\r\n            Create a new alias. Required: --deploymentId and --alias\r\n            Default: false\r\n          -list, -ls\r\n            List aliases. Optional: --deploymentId\r\n            Default: false\r\n          -remove, -rm, -delete, -del\r\n            Remove an alias. Required: --aliasId\r\n            Default: false\r\n\r\n    domains      Manage domains\r\n      Usage: domains [options]\r\n        Options:\r\n          --domainName\r\n            Name of domain\r\n          --externalDNS\r\n            Indicates whether the domain is an external DNS or not\r\n            Default: false\r\n          --recordData\r\n            JSON-serialized description of the domain record to add.\r\n          --recordId\r\n            ID of Domain Record\r\n          -add\r\n            Add a new domain. Required: --domainName . Optional: --externalDNS\r\n            Default: false\r\n          -addRecord\r\n            Add a new domain record. Required: --domainName and --recordData\r\n            Default: false\r\n          -list, -ls\r\n            List domains\r\n            Default: false\r\n          -listRecords, -lsr\r\n            List domain records. Required: --domainName\r\n            Default: false\r\n          -remove, -rm, -delete, -del\r\n            Remove a domain. Required: --domainName\r\n            Default: false\r\n          -removeRecord, -rmr, -deleteRecord, -delr\r\n            Remove a domain record. Required: --domainName and --recordId\r\n            Default: false\r\n\r\n    certs      Manage certificates\r\n      Usage: certs [options]\r\n        Options:\r\n          --certificate, --cert\r\n            CA certificate chain\r\n          --commonName, --cn\r\n            Common Name (CN)\r\n          --domain\r\n            The domain.\r\n            Default: []\r\n          --key\r\n            Private key for the certificate\r\n          --x509, --ca\r\n            X.509 certificate\r\n          -add, -create\r\n            Create a new certificate\r\n            Default: false\r\n          -list, -ls\r\n            List certificates. Required: --cn\r\n            Default: false\r\n          -remove, -rm, -delete, -del\r\n            Remove a certificate. Required: --cn\r\n            Default: false\r\n          -renew\r\n            Renew certificate for domains\r\n            Default: false\r\n          -replace\r\n            Replace certificate for domains\r\n            Default: false\r\n\r\n    secrets      Manage secrets\r\n      Usage: secrets [options]\r\n        Options:\r\n          --secretName, --name\r\n            Secret name\r\n          --secretUid, --uid\r\n            UID of Secret\r\n          --secretValue, --value\r\n            Secret value\r\n          -add, -create\r\n            Create a new secret. Required: --name and --value\r\n            Default: false\r\n          -list, -ls\r\n            List secrets\r\n            Default: false\r\n          -remove, -rm, -delete, -del\r\n            Remove a secret. Required: --name or --uid\r\n            Default: false\r\n          -rename\r\n            Rename a secret. Required: --uid and --name\r\n            Default: false\r\n```\r\n\r\n\u003c/details\u003e\r\n\r\n## Building from source\r\n\r\nYou can build `now4j` in the same way as any Gradle project on Git.\r\n\r\nHowever, thanks to the [Gradle Wrapper](https://docs.gradle.org/3.3/userguide/gradle_wrapper.html) (cf. `gradlew` and `gradlew.bat` scripts), \r\nyou do not need to have Gradle installed on your machine.\r\n\r\n1. Clone the `now4j` repository on your machine:\r\n```bash\r\ngit clone https://github.com/rm3l/now4j \u0026\u0026 cd now4j\r\n```\r\n2. Switch to the appropriate branch if needed with `git checkout ...`\r\n3. Execute a Gradle build in the directory containing the `build.gradle` file:\r\n```bash\r\n./gradlew build\r\n```\r\n4. You will find the artifacts under `library/build/libs` and `cli/build/libs` directories\r\n\r\n## Contributing and Improving Now4J!\r\n\r\nContributions and issue reporting are more than welcome. \r\nSo to help out, do feel free to fork this repo and open up a pull request. \r\nI'll review and merge your changes as quickly as possible.\r\n\r\nYou can use [GitHub issues](https://github.com/rm3l/now4j/issues) to report bugs. \r\nHowever, please make sure your description is clear enough and has sufficient instructions \r\nto be able to reproduce the issue.\r\n\r\n[comment]: \u003c\u003e (See CONTRIBUTING.md for more on contributing to this Github project.)\r\n\r\n\r\n## Credits\r\n\r\n* [Retrofit](http://square.github.io/retrofit/), by [Square](http://square.github.io/)\r\n* [JCommander](https://github.com/cbeust/jcommander), by [Cédric Beust](http://jcommander.org/)\r\n\r\n\r\n## Developed by\r\n\r\n* Armel Soro\r\n  * [keybase.io/rm3l](https://keybase.io/rm3l)\r\n  * [rm3l.org](https://rm3l.org) - \u0026lt;apps+now4j@rm3l.org\u0026gt; - [@rm3l](https://twitter.com/rm3l)\r\n  * [paypal.me/rm3l](https://paypal.me/rm3l)\r\n  * [coinbase.com/rm3l](https://www.coinbase.com/rm3l)\r\n\r\n\r\n## LICENSE\r\n\r\n    The MIT License (MIT)\r\n    \r\n    Copyright (c) 2017 Armel Soro\r\n    \r\n    Permission is hereby granted, free of charge, to any person obtaining a copy\r\n    of this software and associated documentation files (the \"Software\"), to deal\r\n    in the Software without restriction, including without limitation the rights\r\n    to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\r\n    copies of the Software, and to permit persons to whom the Software is\r\n    furnished to do so, subject to the following conditions:\r\n    \r\n    The above copyright notice and this permission notice shall be included in all\r\n    copies or substantial portions of the Software.\r\n    \r\n    THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\r\n    IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\r\n    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\r\n    AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\r\n    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\r\n    OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\r\n    SOFTWARE.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm3l%2Fnow4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frm3l%2Fnow4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frm3l%2Fnow4j/lists"}