Skip to content

Commit

Permalink
feat: Deprecate API keys methods on Index in favor of Client ones
Browse files Browse the repository at this point in the history
  • Loading branch information
aseure committed May 7, 2018
1 parent cd80f01 commit e67c206
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/scala/algolia/definitions/KeyDefinition.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ case class GetKeyDefinition(keyName: String,

type T = GetKeyDefinition

@deprecated("use without index", "1.27.0")
def from(indexName: String): GetKeyDefinition = copy(indexName = Some(indexName))

override def options(requestOptions: RequestOptions): GetKeyDefinition =
Expand Down Expand Up @@ -65,6 +66,7 @@ case class AddKeyDefinition(
extends Definition {
type T = AddKeyDefinition

@deprecated("use without index", "1.27.0")
def to(indexName: String): AddKeyDefinition = copy(indexName = Some(indexName))

override def options(requestOptions: RequestOptions): AddKeyDefinition =
Expand Down Expand Up @@ -94,6 +96,7 @@ case class DeleteKeyDefinition(keyName: String,

type T = DeleteKeyDefinition

@deprecated("use without index", "1.27.0")
def from(indexName: String): DeleteKeyDefinition = copy(indexName = Some(indexName))

override def options(requestOptions: RequestOptions): DeleteKeyDefinition =
Expand Down Expand Up @@ -126,6 +129,7 @@ case class UpdateKeyDefinition(

def `with`(key: ApiKey): UpdateKeyDefinition = copy(key = Some(key))

@deprecated("use without index", "1.27.0")
def from(indexName: String): UpdateKeyDefinition = copy(indexName = Some(indexName))

override def options(requestOptions: RequestOptions): UpdateKeyDefinition =
Expand Down
1 change: 1 addition & 0 deletions src/main/scala/algolia/dsl/ListDsl.scala
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ trait ListDsl {

def keys = ListKeysDefinition()

@deprecated("use without index", "1.27.0")
def keysFrom(indexName: String) =
ListKeysDefinition(indexName = Some(indexName))
}
Expand Down

0 comments on commit e67c206

Please sign in to comment.