タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

APIとapiとrailsに関するbigchuのブックマーク (7)

  • Build a RESTful JSON API With Rails 5 - Part One | DigitalOcean

    Introduction Rails is popularly known for building web applications. Chances are if you’re reading this you’ve built a traditional server-rendered web application with Rails before. If not, I’d highly recommend going through the Getting Started with Rails page to familiarize yourself with the Rails framework before proceeding with this tutorial. As of version 5, Rails core now supports API-only ap

    Build a RESTful JSON API With Rails 5 - Part One | DigitalOcean
    bigchu
    bigchu 2018/03/06
    : Rest
  • Rails による API 専用アプリケーション - Railsガイド

    このガイドの内容: API専用アプリケーションを支援するRailsの機能 Railsの起動時にブラウザ向け機能をオフにする方法 ミドルウェアの選定 コントローラで使うモジュールの選定 1 APIアプリケーションについて 従来、Railsの「API」というと、プログラムからアクセスできるAPIをWebアプリケーションに追加することを指すのが通例でした。たとえば、GitHubが提供するAPIはカスタムクライアントから利用できます。 近年、さまざまなクライアント側フレームワークが登場したことによって、Railsで構築したバックエンドサーバーを他のWebアプリケーションとネイティブアプリケーションの間で共有する手法が増えてきました。 たとえば、X.comは自社のWebアプリケーションでパブリックAPIを利用しています。このWebアプリケーションは、JSONリソースを消費するだけの静的サイトとして構

    Rails による API 専用アプリケーション - Railsガイド
    bigchu
    bigchu 2016/12/12
    : Api mode
  • RailsでAPIをつくるときのエラー処理 - Qiita

    例外を利用して実装すると便利な場合が多い この投稿では、HTTP経由でJSONを返すようなWeb APIRailsを利用して実装するとき、エラーレスポンスを返す場合の処理をどう実装するとやりやすいのか、というニッチな話題に触れる。APIでエラーを返したいとき、即ち400以上のステータスコードと共にレスポンスを返したいような場合、どう実装するのが良いか。もしリクエストの処理中にエラーが検出された場合、それ以降の処理を行わずに直ちに中断してエラーレスポンスを返したいという場合が多いため、例外を利用して実装すると便利な場合が多い。 例外を利用しない方が良い場合もある 1つのリクエストに複数の問題が含まれている場合、先に見つけた問題だけを報告するようなエラーレスポンスを返すのか、それとも問題を抱えながらも進めるところまで処理を進めて報告可能な情報を全て含むようなエラーレスポンスを返すのか、という

    RailsでAPIをつくるときのエラー処理 - Qiita
    bigchu
    bigchu 2015/11/03
    : Error / Rake middleware
  • RailsでAPI作成とAPIのテストのまとめ - Rails Webook

    Photo by Gonzalo Baeza | Flickr - Photo Sharing! RailsでJSONを返すAPIを作成し、また、APIのテスト方法も説明します。 JSONを返すAPIは、RailsのActiveSupportより拡張されたto_jsonメソッドとDMMが開発したjbuilderというGemを使います。 APIのテストにはおなじみのRSpec3を使います。 動作確認 Rails 4.1.7 jbuilder 2.2.6 rspec-rails 3.1.0 factory_girl 4.5.0 目次 1. 前提条件 2. APIの作成 2.1. 1つのコントローラーでHTMLやJSONを返すAPI 2.2. JSONのみを返すAPI 2.3. APIのバージョニング 3. APIのテスト 3.1. テストファイルの準備 3.2. 一覧(index)APIのテス

    RailsでAPI作成とAPIのテストのまとめ - Rails Webook
    bigchu
    bigchu 2015/11/03
    json / 勉強なったあー
  • How to Create an App from Scratch | AppMaster

    Turning an app idea into a working reality is a more complicated task than most people might believe. However, with the wealth of software resources available on the internet, creating an app out of your idea is manageable. You don't even need to necessarily know how to develop mobile apps to make your application work. You can hire third parties or freelancers as there many places where you can f

    bigchu
    bigchu 2015/10/28
    : yourub
  • GitHub - googleapis/google-api-ruby-client

    This repository contains a set of simple client libraries for various Google APIs. These libraries are generated automatically from Discovery Documents, and the code generator is also hosted here in this repository. Each client provides: A client object that connects to the HTTP/JSON REST endpoint for the service. Ruby objects for data structures related to the service. Integration with the google

    GitHub - googleapis/google-api-ruby-client
    bigchu
    bigchu 2015/10/28
    : んあー! bundle の書き方かわってエラーなってた。
  • 1