Skip to content

Commit b3e2cd6

Browse files
committed
Update README.md
Adding programmatic config examples to readme.
1 parent 737439b commit b3e2cd6

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,19 @@ by when initializing the Cloudinary object, or by using the CLOUDINARY_URL envir
6767

6868
The entry point of the library is the Cloudinary object.
6969

70-
cloudinary = new Cloudinary();
70+
Cloudinary cloudinary = new Cloudinary();
71+
72+
Here's an example of setting the configuration parameters programatically:
73+
74+
Map config = new HashMap();
75+
config.put("cloud_name", "n07t21i7");
76+
config.put("api_key", "123456789012345");
77+
config.put("api_secret", "abcdeghijklmnopqrstuvwxyz12");
78+
Cloudinary cloudinary = new Cloudinary(config);
79+
80+
Another example of setting the configuration parameters by providing the CLOUDINARY_URL value to the constructor:
81+
82+
Cloudinary cloudinary = new Cloudinary("cloudinary://123456789012345:abcdeghijklmnopqrstuvwxyz12@n07t21i7");
7183

7284
### Embedding and transforming images
7385

0 commit comments

Comments
 (0)