expand usage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
diff --git a/README.md b/README.md
index 8e72b92..7319dd9 100644
--- a/README.md
+++ b/README.md
@@ -135,16 +135,38 @@ Add the supervisor to your supervision tree:
## Example Usage(s)
-### Example 1: Creating a new container in hubic
+### Example 1:
+
+
+Get account details and containers for given account
```elixir
- import ExOvh.Query.Openstack.Swift
+ alias ExOvh.Query.Openstack.Swift, as: Query
alias ExOvh.Hubic.OpenstackApi.Cache, as: OpenCache
client = ExOvh
+
account = OpenCache.get_account(client)
- ExOvh.hubic_request(create_container(account, "new_container"), %{ openstack: :true })
+ query = Query.account_info(account)
+ {:ok, resp} = ExOvh.hubic_request(query, %{ openstack: :true })
+ container_count1 = resp.body |> Enum.count()
+ ```
+
+Creating a new container in hubic
+ ```elixir
+ random_container = SecureRandom.base64(8)
+ query = Query.create_container(account, random_container)
+ ExOvh.hubic_request(query, %{ openstack: :true })
```
+Get the count of containers again
+ ```elixir
+ query = Query.account_info(account)
+ {:ok, resp} = ExOvh.hubic_request(query, %{ openstack: :true })
+ container_count2 = resp.body |> Enum.count()
+ container_count1 + 1 == container_count2
+ ```
+
+
# TO BE CONTINUED..... LATER ....