# REST API vs. the Ruby API

**URL:** <https://meta.discourse.org/t/rest-api-vs-the-ruby-api/108654>\
**Category:** Development\
**Created:** [February 8, 2019, 2:34am UTC](https://meta.discourse.org/t/rest-api-vs-the-ruby-api/108654 "2019-02-08T02:34:52Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![simon](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/simon/32/339122_2.png) [@simon](https://meta.discourse.org/u/simon)\
**Post date:** [February 8, 2019, 6:08am UTC](https://meta.discourse.org/t/rest-api-vs-the-ruby-api/108654/3 "2019-02-08T06:08:29Z")

</div>

> [@kimardenmiller](#):
>
> Is it safe to assume there is not a 1 to 1 mapping, i.e. the Ruby API does not do everything the REST API can do?

From the [discourse\_api README](https://github.com/discourse/discourse_api):

> Over time this project intends to have a full Discourse API. At the moment there are only a few endpoints available

> [@kimardenmiller](#):
>
> It seems messy adding my code to the published Ruby API’s code. Best practices?

Reopening the module where you are placing your code and adding your method there might work. Have a look at the second example here: [modules\_and\_classes - Documentation for Ruby 2.3.0](https://docs.ruby-lang.org/en/2.3.0/syntax/modules_and_classes_rdoc.html#label-Module+Definition). Another option would be to make a pull request to have your code added to the gem.

---

_[View the full topic](https://meta.discourse.org/t/rest-api-vs-the-ruby-api/108654)._
