- 
                Notifications
    
You must be signed in to change notification settings  - Fork 36
 
migrated search(route) and search(stop) pages to REST API Method #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Open
      
      
            Ajay9330
  wants to merge
  4
  commits into
  OneBusAway:main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
Ajay9330:methodpagefix
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
  
     Open
                    Changes from 2 commits
      Commits
    
    
            Show all changes
          
          
            4 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      a17af0a
              
                migrated search(route) and search(stop) to REST API Method
              
              
                Ajay9330 c15f27c
              
                Added the response of search/stop and search/route
              
              
                Ajay9330 70bbd2c
              
                Merge branch 'OneBusAway:main' into methodpagefix
              
              
                Ajay9330 73858c6
              
                made the changes according to review
              
              
                Ajay9330 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| { | ||
| "code": 200, | ||
| "currentTime": 1712466541608, | ||
| "data": { | ||
| "limitExceeded": false, | ||
| "list": [ | ||
| { | ||
| "agencyId": "20", | ||
| "color": "7C8076", | ||
| "description": "", | ||
| "id": "20_97", | ||
| "longName": "Crystal Springs", | ||
| "nullSafeShortName": "97", | ||
| "shortName": "97", | ||
| "textColor": "000000", | ||
| "type": 3, | ||
| "url": "http://www.kitsaptransit.com/service/routed-buses/97-crystal-springs" | ||
| } | ||
| ], | ||
| "outOfRange": false, | ||
| "references": { | ||
| "agencies": [ | ||
| { | ||
| "disclaimer": "", | ||
| "email": "[email protected]", | ||
| "fareUrl": "http://www.kitsaptransit.com/fares/fares", | ||
| "id": "20", | ||
| "lang": "en", | ||
| "name": "Kitsap Transit", | ||
| "phone": "(800) 501-7433", | ||
| "privateService": false, | ||
| "timezone": "America/Los_Angeles", | ||
| "url": "http://www.kitsaptransit.com" | ||
| } | ||
| ], | ||
| "routes": [], | ||
| "situations": [], | ||
| "stopTimes": [], | ||
| "stops": [], | ||
| "trips": [] | ||
| } | ||
| }, | ||
| "text": "OK", | ||
| "version": 2 | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,63 @@ | ||
| { | ||
| "code": 200, | ||
| "currentTime": 1712466666374, | ||
| "data": { | ||
| "limitExceeded": false, | ||
| "list": [ | ||
| { | ||
| "code": "3695", | ||
| "direction": "W", | ||
| "id": "3_14174", | ||
| "lat": 47.220786, | ||
| "locationType": 0, | ||
| "lon": -122.549174, | ||
| "name": "40th St W & Crystal Pl W", | ||
| "parent": "", | ||
| "routeIds": [ | ||
| "3_53" | ||
| ], | ||
| "staticRouteIds": [ | ||
| "3_53" | ||
| ], | ||
| "wheelchairBoarding": "ACCESSIBLE" | ||
| } | ||
| ], | ||
| "outOfRange": false, | ||
| "references": { | ||
| "agencies": [ | ||
| { | ||
| "disclaimer": "", | ||
| "email": "", | ||
| "fareUrl": "https://www.piercetransit.org/PT-fares/", | ||
| "id": "3", | ||
| "lang": "en", | ||
| "name": "Pierce Transit", | ||
| "phone": "1-253-581-8000", | ||
| "privateService": false, | ||
| "timezone": "America/Los_Angeles", | ||
| "url": "https://www.piercetransit.org" | ||
| } | ||
| ], | ||
| "routes": [ | ||
| { | ||
| "agencyId": "3", | ||
| "color": "6cb33f", | ||
| "description": "", | ||
| "id": "3_53", | ||
| "longName": "University Place", | ||
| "nullSafeShortName": "53", | ||
| "shortName": "53", | ||
| "textColor": "000000", | ||
| "type": 3, | ||
| "url": "https://www.piercetransit.org/routes/?id=53" | ||
| } | ||
| ], | ||
| "situations": [], | ||
| "stopTimes": [], | ||
| "stops": [], | ||
| "trips": [] | ||
| } | ||
| }, | ||
| "text": "OK", | ||
| "version": 2 | ||
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| --- | ||
| layout: rest_api | ||
| title: search (route) Method | ||
| description: Search for a route based on its name. | ||
| sample_request_url: http://api.pugetsound.onebusaway.org/api/where/search/route.json?input=crystal&key=TEST | ||
                
      
                  Ajay9330 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| example_response_file: search_route_crystal.json | ||
| --- | ||
| 
     | 
||
| ## Request Parameters | ||
| 
     | 
||
| * `input` - the string to search for, encoded directly in the URL: | ||
| * `http://api.pugetsound.onebusaway.org/api/where/search/route.json?input=[INPUT GOES HERE]` | ||
                
      
                  Ajay9330 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| * `maxCount` - the max number of results to return. Defaults to 20. | ||
| ## Response | ||
                
      
                  Ajay9330 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
| The method returns a [list result](../elements/list-result), so see additional documentation on controlling the number of elements returned and interpreting the results. The list contents are `<route/>` elements, so see details about the various properties of the [`<route/>` element](../elements/route). | ||
                
      
                  Ajay9330 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| --- | ||
| layout: rest_api | ||
| title: search (stop) Method | ||
| description: Search for a stop based on its name. | ||
| sample_request_url: http://api.pugetsound.onebusaway.org/api/where/search/stop.json?input=crystal&key=TEST | ||
| example_response_file: search_stop_crystal.json | ||
| --- | ||
| 
     | 
||
| ## Request Parameters | ||
| 
     | 
||
| * `input` - the string to search for, encoded directly in the URL: | ||
| * `http://api.pugetsound.onebusaway.org/api/where/search/stop.json?input=[INPUT GOES HERE]` | ||
| * `maxCount` - the max number of results to return. Defaults to 20. | ||
| 
     | 
||
| ## Response | ||
| The method returns a [list result](../elements/list-result), so see additional documentation on controlling the number of elements returned and interpreting the results. The list contents are `<stop/>` elements, so see details about the various properties of the [`<stop/>` element](../elements/stop). | ||
                
      
                  Ajay9330 marked this conversation as resolved.
               
              
                Outdated
          
            Show resolved
            Hide resolved
         | 
||
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              This file was deleted.
      
      Oops, something went wrong.
      
    
  This file was deleted.
      
      Oops, something went wrong.
      
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please alphabetize these two methods
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please rename the new pages to
search-stopandsearch-routeThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sir, i need 2 little bit clarifications
search-routeorSearch-Routefor the new page name and method name, because the both should be same else it will show 404page titlewhich can be differ from thepage namecan we keep
search-routeformat everywhere?