Skip to content

Commit

Permalink
Add CocoaPods and SPM installation instruction
Browse files Browse the repository at this point in the history
Daniil Subbotin authored and vani2 committed Sep 9, 2020
1 parent 941ccfe commit b026dcf
Showing 2 changed files with 44 additions and 0 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -12,6 +12,28 @@ The library for organizing a network layer in a project.
- Separate the objects to work with the network in a separate module, target or library, so that they are isolated in their `namespace`.
- Break down requests into separate structures. Classes are not forbidden, but make them non-mutable. Use `enum` if different requests have the same response.

## Installation

### CocoaPods

To integrate Apexy into your Xcode project using CocoaPods, specify it in your Podfile:

`pod 'Apexy'`

### Swift Package Manager

If you have Xcode project open it and select **File → Swift Packages → Add package Dependency** and paste Apexy repository URL:

`https://github.com/RedMadRobot/apexy-ios`

If you have your own Swift package, add Apexy as a dependency to the dependencies value of your Package.swift.

```swift
dependencies: [
.package(url: "https://github.com/RedMadRobot/apexy-ios.git")
]
```

## Endpoint

`Endpoint` - one of the basic protocols for organizing work with REST API. It is a set of request and response processing.
22 changes: 22 additions & 0 deletions README.ru.md
Original file line number Diff line number Diff line change
@@ -12,6 +12,28 @@
- Выделяйте объекты для работы с сетью в отдельный модуль, таргет или библиотеку, чтобы они находились изолировано в своём `namespace`.
- Разбивайте запросы на отдельные структуры. Классы не запрещаются, но делайте их неизменяемыми. `enum` могут подойти, если разные запросы имеют одинаковый ответ на них.

## Установка

### CocoaPods

Чтобы добавить Apexy в ваш Xcode проект используя CocoaPods, укажите его в Podfile:

`pod 'Apexy'`

### Swift Package Manager

Если у вас есть Xcode проект, откройте его и выберите **File → Swift Packages → Add package Dependency** и вставьте адрес репозитория Apexy:

`https://github.com/RedMadRobot/apexy-ios`

Если у вас есть Swift пакет, добавьте Apexy как зависимость в свойство dependencies файла Package.swift.

```swift
dependencies: [
.package(url: "https://github.com/RedMadRobot/apexy-ios.git")
]
```

## Endpoint

`Endpoint` - один из базовых протоколов организации работы с REST API. Является совокупностью запроса и обработки ответа.

0 comments on commit b026dcf

Please sign in to comment.