From ee98c99cd9faae32e9d4f2b0ae3d2078b364687a Mon Sep 17 00:00:00 2001 From: Ben Wilson Date: Fri, 22 Jul 2016 16:00:39 -0400 Subject: [PATCH] doc updates --- lib/ex_aws/ec2.ex | 4 ++++ lib/ex_aws/kinesis.ex | 41 +------------------------------- lib/ex_aws/lambda.ex | 9 ++++--- lib/ex_aws/rds.ex | 23 ++++-------------- lib/ex_aws/s3.ex | 44 +--------------------------------- lib/ex_aws/sns.ex | 55 +------------------------------------------ lib/ex_aws/sqs.ex | 16 +------------ mix.exs | 9 +++++-- 8 files changed, 23 insertions(+), 178 deletions(-) diff --git a/lib/ex_aws/ec2.ex b/lib/ex_aws/ec2.ex index 6d4c255a..69519d61 100644 --- a/lib/ex_aws/ec2.ex +++ b/lib/ex_aws/ec2.ex @@ -1,4 +1,8 @@ defmodule ExAws.EC2 do + @moduledoc """ + Operations on AWS EC2 + """ + import ExAws.Utils @version "2015-10-01" diff --git a/lib/ex_aws/kinesis.ex b/lib/ex_aws/kinesis.ex index 35cb609a..0dafcc30 100644 --- a/lib/ex_aws/kinesis.ex +++ b/lib/ex_aws/kinesis.ex @@ -1,45 +1,6 @@ defmodule ExAws.Kinesis do @moduledoc """ - Defines a Kinesis client. - - Usage: - ``` - defmodule MyApp.Kinesis do - use ExAws.Kinesis.Client, otp_app: :my_otp_app - end - ``` - - In your config - ``` - config :my_otp_app, :ex_aws, - kinesis: [], # kinesis config goes here - dynamodb: [], # you get the idea - ``` - - You can now use MyApp.Kinesis as the root module for the Kinesis api without needing - to pass in a particular configuration. - This enables different otp apps to configure their AWS configuration separately. - - The alignment with a particular OTP app however is entirely optional. - The following also works: - - ``` - defmodule MyApp.Kinesis do - use ExAws.Kinesis.Client - - def config_root do - Application.get_all_env(:my_aws_config_root) - end - end - ``` - ExAws now expects the config for that kinesis client to live under - - ```elixir - config :my_aws_config_root - kinesis: [] # Kinesis config goes here - ``` - - Default config values can be found in ExAws.Config + Operations on AWS Kinesis http://docs.aws.amazon.com/kinesis/latest/APIReference/API_Operations.html """ diff --git a/lib/ex_aws/lambda.ex b/lib/ex_aws/lambda.ex index 289f656a..a15c3b6c 100644 --- a/lib/ex_aws/lambda.ex +++ b/lib/ex_aws/lambda.ex @@ -1,12 +1,11 @@ defmodule ExAws.Lambda do + @moduledoc """ + Operations on ExAws Lambda + """ + import ExAws.Utils, only: [camelize_keys: 1, upcase: 1] require Logger - @moduledoc false - # Implimentation of the AWS Kinesis API. - # - # See ExAws.Kinesis.Client for usage. - @namespace "Lambda" @actions %{ add_permission: :post, diff --git a/lib/ex_aws/rds.ex b/lib/ex_aws/rds.ex index 742431a2..a23c1fea 100644 --- a/lib/ex_aws/rds.ex +++ b/lib/ex_aws/rds.ex @@ -1,26 +1,11 @@ defmodule ExAws.RDS do - import ExAws.Utils, only: [camelize_keys: 1] - - @version "2014-10-31" - - @moduledoc """ - The purpose of this module is to surface the ExAws.RDS API tied to a single - configuration chosen, sich that it does not need passed in with every request. + Operations on AWS RDS + """ - Usage: - ``` - defmodule MyApp.RDS do - use ExAws.RDS.Client, otp_app: :my_otp_app - end - ``` + import ExAws.Utils, only: [camelize_keys: 1] - In your config - ``` - config :my_otp_app, :ex_aws, - rds: [], # RDS config goes here - ``` - """ + @version "2014-10-31" @type db_instance_classes :: [ :db_t1_micro | :db_m1_small | :db_m1_medium | :db_m1_large | :db_m1_xlarge | diff --git a/lib/ex_aws/s3.ex b/lib/ex_aws/s3.ex index 04c53ee1..873677e0 100644 --- a/lib/ex_aws/s3.ex +++ b/lib/ex_aws/s3.ex @@ -1,48 +1,6 @@ defmodule ExAws.S3 do - @moduledoc """ - The purpose of this module is to surface the ExAws.S3 API tied to a single - configuration chosen, such that it does not need passed in with every request. - - Usage: - ``` - defmodule MyApp.S3 do - use ExAws.S3.Client, otp_app: :my_otp_app - end - ``` - - In your config - ``` - config :my_otp_app, :ex_aws, - s3: [], # S3 config goes here - ``` - - You can now use MyApp.S3 as the root module for the S3 api without needing - to pass in a particular configuration. - This enables different otp apps to configure their AWS configuration separately. - - The alignment with a particular OTP app while convenient is however entirely optional. - The following also works: - - ``` - defmodule MyApp.S3 do - use ExAws.S3.Client - - def config_root do - Application.get_all_env(:my_aws_config_root) - end - end - ``` - ExAws now expects the config for that S3 client to live under - - ```elixir - config :my_aws_config_root - s3: [] # S3 config goes here - ``` - - This is in fact how the functions in ExAws.S3 that do not require a config work. - Default config values can be found in ExAws.Config. The default configuration is always used, - and then the configuration of a particular client is merged in and overrides the defaults. + Operations on AWS S3 """ import ExAws.S3.Utils diff --git a/lib/ex_aws/sns.ex b/lib/ex_aws/sns.ex index 757497ae..39ccfe90 100644 --- a/lib/ex_aws/sns.ex +++ b/lib/ex_aws/sns.ex @@ -2,60 +2,7 @@ defmodule ExAws.SNS do import ExAws.Utils, only: [camelize_key: 1, camelize_keys: 1] @moduledoc """ - Defines an SNS Client - - By default you can use ExAws.SNS - - ## Usage - - ``` - defmodule MyApp.SNS do - use ExAws.SNS.Client, otp_app: :my_otp_app - end - ``` - - In your config: - - ``` - config :my_otp_app, :ex_aws, - sns: [], # SNS config goes here - ``` - - You can now use MyApp.SNS as the root module for the SNS API without - needing to pass in a particular configuration. This enables different OTP - apps to configure their AWS configurations separately. - - The alignment with a particular OTP app while convenient is however entirely - optional. - - The following also works: - - ``` - defmodule MyApp.SNS do - use ExAws.SNS.Client - - def config_root do - Application.get_all_env(:my_aws_config_root) - end - end - ``` - - ExAws now expects the config for that client to live under `:my_aws_config_root`: - - ```elixir - config :my_aws_config_root - sns: [] # SNS config goes here - ``` - - Default config values can be found in ExAws.Config. - - ## General notes - - TODO - - ## Examples - - TODO + Operations on AWS SNS http://docs.aws.amazon.com/sns/latest/APIReference/API_Operations.html """ diff --git a/lib/ex_aws/sqs.ex b/lib/ex_aws/sqs.ex index 9fdfcedc..478007ac 100644 --- a/lib/ex_aws/sqs.ex +++ b/lib/ex_aws/sqs.ex @@ -1,20 +1,6 @@ defmodule ExAws.SQS do @moduledoc """ - The purpose of this module is to surface the ExAws.SQS API tied to a single - configuration chose, such that it does not need passed in with every request - - Usage: - ```elixir - defmodule MyApp.SQS do - use ExAws.SQS.Client, otp_app: :my_otp_app - end - ``` - - In your config - ```elixir - config :my_otp_app, ExAws, - sqs: [], #SQS config goes here - ``` + Operations on AWS SQS """ @type sqs_permission :: diff --git a/mix.exs b/mix.exs index bb65b224..43dc55ae 100644 --- a/mix.exs +++ b/mix.exs @@ -1,9 +1,11 @@ defmodule ExAws.Mixfile do use Mix.Project + @version "1.0.0-beta1" + def project do [app: :ex_aws, - version: "1.0.0-beta1", + version: @version, elixir: "~> 1.0", elixirc_paths: elixirc_paths(Mix.env), description: "AWS client. Currently supports Dynamo, EC2, Kinesis, Lambda, RDS, S3, SNS, SQS", @@ -11,7 +13,10 @@ defmodule ExAws.Mixfile do source_url: "https://github.com/cargosense/ex_aws", package: package, dialyzer: [flags: "--fullpath"], - deps: deps] + deps: deps, + docs: [main: "ExAws", source_ref: "v#{@version}", + source_url: "https://github.com/cargosense/ex_aws"] + ] end def application do